Public Header.
More...
#include <botan/compiler.h>
Go to the source code of this file.
Public Header.
Definition in file assert.h.
◆ BOTAN_ARG_CHECK
#define BOTAN_ARG_CHECK |
( |
|
expr, |
|
|
|
msg |
|
) |
| |
Value: do { \
if(!(expr)) \
Botan::throw_invalid_argument(msg, __func__, __FILE__); \
} while(0)
Definition at line 29 of file assert.h.
◆ BOTAN_ASSERT
#define BOTAN_ASSERT |
( |
|
expr, |
|
|
|
assertion_made |
|
) |
| |
Value: do { \
if(!(expr)) \
Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
} while(0)
Make an assertion
Definition at line 50 of file assert.h.
◆ BOTAN_ASSERT_EQUAL
#define BOTAN_ASSERT_EQUAL |
( |
|
expr1, |
|
|
|
expr2, |
|
|
|
assertion_made |
|
) |
| |
Value: do { \
if((expr1) != (expr2)) \
Botan::assertion_failure(#expr1 " == " #expr2, assertion_made, __func__, __FILE__, __LINE__); \
} while(0)
Assert that value1 == value2
Definition at line 68 of file assert.h.
◆ BOTAN_ASSERT_IMPLICATION
#define BOTAN_ASSERT_IMPLICATION |
( |
|
expr1, |
|
|
|
expr2, |
|
|
|
msg |
|
) |
| |
Value: do { \
if((expr1) && !(expr2)) \
Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
} while(0)
Assert that expr1 (if true) implies expr2 is also true
Definition at line 77 of file assert.h.
◆ BOTAN_ASSERT_NOMSG
#define BOTAN_ASSERT_NOMSG |
( |
|
expr | ) |
|
Value: do { \
if(!(expr)) \
Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
} while(0)
Make an assertion
Definition at line 59 of file assert.h.
◆ BOTAN_ASSERT_NONNULL
#define BOTAN_ASSERT_NONNULL |
( |
|
ptr | ) |
|
Value: do { \
if((ptr) == nullptr) \
Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
} while(0)
Assert that a pointer is not null
Definition at line 86 of file assert.h.
◆ BOTAN_ASSERT_UNREACHABLE
◆ BOTAN_DEBUG_ASSERT
#define BOTAN_DEBUG_ASSERT |
( |
|
expr | ) |
|
◆ BOTAN_STATE_CHECK
#define BOTAN_STATE_CHECK |
( |
|
expr | ) |
|
Value: do { \
if(!(expr)) \
Botan::throw_invalid_state(#expr, __func__, __FILE__); \
} while(0)
Definition at line 41 of file assert.h.
◆ BOTAN_UNUSED