Skip to content

assert

The assert is a compiler built-in debugging tool used to assert a certain condition, that the condition must result true. Otherwise, the program terminates with stack trace and debug information.

Syntax

assert(p != null);
assert(p != null, "Assertion Failed: the pointer p must not be null.");