TaPAS
0.2
|
Macros allowing to set assertions into the code. More...
Go to the source code of this file.
Macros | |
#define | ccl_assert(_cond_) CCL_CHECK_CONDITION ("assertion", _cond_, __FILE__, __LINE__) |
Checks if the assertion cond is satisfied. | |
#define | ccl_pre(_cond_) CCL_CHECK_CONDITION ("pre-condition", _cond_, __FILE__, __LINE__) |
Checks if the pre-condition cond is satisfied. | |
#define | ccl_post(_cond_) CCL_CHECK_CONDITION ("post-condition", _cond_, __FILE__, __LINE__) |
Checks if the post-condition cond is satisfied. | |
#define | ccl_imply(_a, _b) ((!(_a)) || (_b)) |
Shortcut to write the implication of _a by _b. | |
Functions | |
CCL_DECLARE_EXCEPTION (assertion, internal_error) | |
Exception raised when an assertion is violated. | |
CCL_DECLARE_EXCEPTION (unreachable_code_error, internal_error) | |
Exception raised when an assumed unreachable branch of the code is accessed. | |
Macros allowing to set assertions into the code.
This is a set of macros that raise an exception when a condition is not satisfied. This macros are enable if the macro-constant CCL_ENABLE_ASSERTIONS is defined.
Definition in file ccl-assert.h.