File for all Debug macros and classes.
- Author
- Christian Feichtinger
-
Christian Godenschwager chris.nosp@m.tian.nosp@m..gode.nosp@m.nsch.nosp@m.wager.nosp@m.@fau.nosp@m..de
Some advanced assert macros that print a nice error message on failure.
Examples:
- WALBERLA_ASSERT( X ) - X must evaluate to true, otherwise the assertion fails
- WALBERLA_ASSERT_NULLPTR( X ) - X must be a null pointer, otherwise the assertion fails
- WALBERLA_ASSERT_NOT_NULLPTR( X ) - X must not be a null pointer, otherwise the assertion fails
- WALBERLA_ASSERT_EQUAL( X, Y ) - X must be equal to Y, otherwise the assertion fails (for floating point types, use FLOAT_EQUAL or IDENTICAL)
- WALBERLA_ASSERT_UNEQUAL( X, Y ) - X must not be equal to Y, otherwise the assertion fails (for floating point types, use FLOAT_UNEQUAL or NOT_IDENTICAL)
- WALBERLA_ASSERT_FLOAT_EQUAL( X, Y ) - X must be equal to Y, otherwise the assertion fails (floating point types are considered equal even if they differ by a small epsilon)
- WALBERLA_ASSERT_FLOAT_UNEQUAL( X, Y ) - X must not be equal to Y, otherwise the assertion fails (floating point types are only considered unequal if they differ by more than a small epsilon)
- WALBERLA_ASSERT_IDENTICAL( X, Y ) - X must be identical to Y, otherwise the assertion fails (floating point types are only identical if they are bit-identical)
- WALBERLA_ASSERT_NOT_IDENTICAL( X, Y ) - X must not be identical to Y, otherwise the assertion fails (floating point types are not identical if they are not bit-identical)
- WALBERLA_ASSERT_LESS( X, Y ) - assertion fails if X<Y evaluates to false
- WALBERLA_ASSERT_GREATER( X, Y ) - assertion fails if X>Y evaluates to false
- WALBERLA_ASSERT_LESS_EQUAL( X, Y ) - assertion fails if X<=Y evaluates to false
- WALBERLA_ASSERT_GREATER_EQUAL( X, Y ) - assertion fails if X>=Y evaluates to false
For every macro, you can provide a custom message via an additional argument, e.g.: WALBERLA_ASSERT( false, "Will always fail!" ) or WALBERLA_ASSERT_LESS( 42, 5, "42 is larger than 5!" )
|
| #define | WALBERLA_ASSERT_1(X) |
| #define | WALBERLA_ASSERT_NULLPTR_1(X) |
| #define | WALBERLA_ASSERT_NOT_NULLPTR_1(X) |
| #define | WALBERLA_ASSERT_EQUAL_2(X, Y) |
| #define | WALBERLA_ASSERT_UNEQUAL_2(X, Y) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_2(X, Y) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_2(X, Y) |
| #define | WALBERLA_ASSERT_IDENTICAL_2(X, Y) |
| #define | WALBERLA_ASSERT_NOT_IDENTICAL_2(X, Y) |
| #define | WALBERLA_ASSERT_LESS_2(X, Y) |
| #define | WALBERLA_ASSERT_GREATER_2(X, Y) |
| #define | WALBERLA_ASSERT_LESS_EQUAL_2(X, Y) |
| #define | WALBERLA_ASSERT_GREATER_EQUAL_2(X, Y) |
| #define | WALBERLA_ASSERT_2(X, MSG) |
| #define | WALBERLA_ASSERT_NULLPTR_2(X, MSG) |
| #define | WALBERLA_ASSERT_NOT_NULLPTR_2(X, MSG) |
| #define | WALBERLA_ASSERT_EQUAL_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_UNEQUAL_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_EPSILON_3(X, Y, EPS) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_EPSILON_3(X, Y, EPS) |
| #define | WALBERLA_ASSERT_IDENTICAL_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_NOT_IDENTICAL_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_LESS_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_GREATER_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_LESS_EQUAL_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_GREATER_EQUAL_3(X, Y, MSG) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_EPSILON_4(X, Y, EPS, MSG) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_EPSILON_4(X, Y, EPS, MSG) |
| #define | WALBERLA_ASSERT_3(...) |
| #define | WALBERLA_ASSERT_4(...) |
| #define | WALBERLA_ASSERT_5(...) |
| #define | WALBERLA_ASSERT_6(...) |
| #define | WALBERLA_ASSERT_NULLPTR_3(...) |
| #define | WALBERLA_ASSERT_NULLPTR_4(...) |
| #define | WALBERLA_ASSERT_NULLPTR_5(...) |
| #define | WALBERLA_ASSERT_NULLPTR_6(...) |
| #define | WALBERLA_ASSERT_NOT_NULLPTR_3(...) |
| #define | WALBERLA_ASSERT_NOT_NULLPTR_4(...) |
| #define | WALBERLA_ASSERT_NOT_NULLPTR_5(...) |
| #define | WALBERLA_ASSERT_NOT_NULLPTR_6(...) |
| #define | WALBERLA_ASSERT_EQUAL_1(...) |
| #define | WALBERLA_ASSERT_EQUAL_4(...) |
| #define | WALBERLA_ASSERT_EQUAL_5(...) |
| #define | WALBERLA_ASSERT_EQUAL_6(...) |
| #define | WALBERLA_ASSERT_UNEQUAL_1(...) |
| #define | WALBERLA_ASSERT_UNEQUAL_4(...) |
| #define | WALBERLA_ASSERT_UNEQUAL_5(...) |
| #define | WALBERLA_ASSERT_UNEQUAL_6(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_1(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_4(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_5(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_6(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_1(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_4(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_5(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_6(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_EPSILON_1(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_EPSILON_2(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_EPSILON_5(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_EPSILON_6(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_EPSILON_1(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_EPSILON_2(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_EPSILON_5(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_EPSILON_6(...) |
| #define | WALBERLA_ASSERT_IDENTICAL_1(...) |
| #define | WALBERLA_ASSERT_IDENTICAL_4(...) |
| #define | WALBERLA_ASSERT_IDENTICAL_5(...) |
| #define | WALBERLA_ASSERT_IDENTICAL_6(...) |
| #define | WALBERLA_ASSERT_NOT_IDENTICAL_1(...) |
| #define | WALBERLA_ASSERT_NOT_IDENTICAL_4(...) |
| #define | WALBERLA_ASSERT_NOT_IDENTICAL_5(...) |
| #define | WALBERLA_ASSERT_NOT_IDENTICAL_6(...) |
| #define | WALBERLA_ASSERT_LESS_1(...) |
| #define | WALBERLA_ASSERT_LESS_4(...) |
| #define | WALBERLA_ASSERT_LESS_5(...) |
| #define | WALBERLA_ASSERT_LESS_6(...) |
| #define | WALBERLA_ASSERT_GREATER_1(...) |
| #define | WALBERLA_ASSERT_GREATER_4(...) |
| #define | WALBERLA_ASSERT_GREATER_5(...) |
| #define | WALBERLA_ASSERT_GREATER_6(...) |
| #define | WALBERLA_ASSERT_LESS_EQUAL_1(...) |
| #define | WALBERLA_ASSERT_LESS_EQUAL_4(...) |
| #define | WALBERLA_ASSERT_LESS_EQUAL_5(...) |
| #define | WALBERLA_ASSERT_LESS_EQUAL_6(...) |
| #define | WALBERLA_ASSERT_GREATER_EQUAL_1(...) |
| #define | WALBERLA_ASSERT_GREATER_EQUAL_4(...) |
| #define | WALBERLA_ASSERT_GREATER_EQUAL_5(...) |
| #define | WALBERLA_ASSERT_GREATER_EQUAL_6(...) |
| #define | WALBERLA_ASSERT(...) |
| #define | WALBERLA_ASSERT_NULLPTR(...) |
| #define | WALBERLA_ASSERT_NOT_NULLPTR(...) |
| #define | WALBERLA_ASSERT_EQUAL(...) |
| #define | WALBERLA_ASSERT_UNEQUAL(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL(...) |
| #define | WALBERLA_ASSERT_FLOAT_EQUAL_EPSILON(...) |
| #define | WALBERLA_ASSERT_FLOAT_UNEQUAL_EPSILON(...) |
| #define | WALBERLA_ASSERT_IDENTICAL(...) |
| #define | WALBERLA_ASSERT_NOT_IDENTICAL(...) |
| #define | WALBERLA_ASSERT_LESS(...) |
| #define | WALBERLA_ASSERT_GREATER(...) |
| #define | WALBERLA_ASSERT_LESS_EQUAL(...) |
| #define | WALBERLA_ASSERT_GREATER_EQUAL(...) |
| #define | WALBERLA_ASSERT_SECTION(condition) |
| #define | WALBERLA_DEBUG_SECTION() |