Purpose
Definition of the ASSERT() and
SANITY_CHECK() macros, which are used for runtime condition & parameter verifying.
Usage
- Use ASSERT() in your code to check the value of function parameters, return values, etc. *Warning:* the ASSERT() condition must not have any side-effect; otherwise, the program may not work properly anymore when assertions are disabled.
- Use SANITY_CHECK() to perform checks with a default error message (outputs the file and line number where the error occured). This reduces memory overhead caused by assertion error strings.
- Initialize the dbgu to see failed assertions at run-time.
- Assertions can be entirely disabled by defining the NOASSERT symbol at compilation time.