75 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::OutOfMemoryError>);
76 static_assert(
true == std::is_base_of_v<std::bad_alloc, jau::OutOfMemoryError>);
77 static_assert(
true == std::is_base_of_v<std::exception, jau::OutOfMemoryError>);
83 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::RuntimeExceptionBase>);
84 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::RuntimeException>);
85 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::RuntimeException>);
86 static_assert(
true == std::is_base_of_v<std::exception, jau::RuntimeException>);
92 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::LogicErrorBase>);
93 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::LogicError>);
94 static_assert(
true == std::is_base_of_v<std::logic_error, jau::LogicError>);
95 static_assert(
true == std::is_base_of_v<std::exception, jau::LogicError>);
101 static_assert(
true == std::is_base_of_v<std::out_of_range, jau::IndexOutOfBoundsError>);
102 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IndexOutOfBoundsError>);
103 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IndexOutOfBoundsError>);
110 static_assert(
true == std::is_base_of_v<std::invalid_argument, jau::IllegalArgumentError>);
111 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IllegalArgumentError>);
112 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IllegalArgumentError>);
119 static_assert(
true == std::is_base_of_v<std::domain_error, jau::IllegalStateError>);
120 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IllegalStateError>);
121 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IllegalStateError>);
128 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::RuntimeSystemExceptionBase>);
129 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::RuntimeSystemExceptionBase>);
130 static_assert(
true == std::is_base_of_v<jau::RuntimeSystemExceptionBase, jau::RuntimeSystemException>);
131 static_assert(
true == std::is_base_of_v<std::system_error, jau::RuntimeSystemException>);
132 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::RuntimeSystemException>);
133 static_assert(
true == std::is_base_of_v<std::exception, jau::RuntimeSystemException>);
140 static_assert(
true == std::is_base_of_v<std::ios_base::failure, jau::IOError>);
141 static_assert(
true == std::is_base_of_v<jau::RuntimeSystemExceptionBase, jau::IOError>);
142 static_assert(
true == std::is_base_of_v<std::system_error, jau::IOError>);
143 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::IOError>);
144 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::IOError>);
146 REQUIRE_THROWS_AS(
throwIOError(), std::ios_base::failure );
150 REQUIRE_THROWS_AS(
throwIOError(), std::runtime_error );
193TEST_CASE(
"Exception 10 Math",
"[big_int_t][exceptions][error][math]" ) {
195 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathError>);
196 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathError>);
200 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathInexactError>);
201 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathInexactError>);
202 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathInexactError>);
203 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathInexactError>);
210 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathOverflowError>);
211 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathOverflowError>);
212 static_assert(
true == std::is_base_of_v<std::overflow_error, jau::math::MathOverflowError>);
213 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathOverflowError>);
214 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathOverflowError>);
222 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathUnderflowError>);
223 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathUnderflowError>);
224 static_assert(
true == std::is_base_of_v<std::underflow_error, jau::math::MathUnderflowError>);
225 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathUnderflowError>);
226 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathUnderflowError>);
234 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathDomainError>);
235 static_assert(
true == std::is_base_of_v<std::domain_error, jau::math::MathDomainError>);
236 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathDomainError>);
242 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathDivByZeroError>);
243 static_assert(
true == std::is_base_of_v<jau::math::MathDomainError, jau::math::MathDivByZeroError>);
244 static_assert(
true == std::is_base_of_v<std::domain_error, jau::math::MathDivByZeroError>);
245 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathDivByZeroError>);