|
NSUNI/NSLAR Library a250670
|
Defines macros for Design-by-Contract verification. More...
Macros | |
| #define | NNL_EXPECTS(precondition) |
| A precondition check. | |
| #define | NNL_EXPECTS_DBG(precondition) |
| Debug-only precondition check. | |
| #define | NNL_ENSURES_DBG(postcondition) |
| Debug-only postcondition check. | |
Defines macros for Design-by-Contract verification.
| #define NNL_ENSURES_DBG | ( | postcondition | ) |
Debug-only postcondition check.
This macro is used to check requirements that must hold true after the function executes. The function itself is responsible for ensuring these conditions, assuming all preconditions were met; failure indicates a bug in the function.
| #define NNL_EXPECTS | ( | precondition | ) |
A precondition check.
This macro is used to check requirements that must hold true before the function is called. The caller must ensure these conditions; failure typically indicates an error in the calling code.
NNL_THROW_ON_CONTRACT_VIOLATION is enabled, it throws nnl::PreconditionError instead.| #define NNL_EXPECTS_DBG | ( | precondition | ) |
Debug-only precondition check.