EzC
Macros
ezc_assert.h File Reference

Macro for assertions when debugging. More...

Go to the source code of this file.

Macros

#define assert(expr)   ((void) ((expr) || (ezc_assert(__FILE__, __LINE__, #expr), 0)))
 Macro for assertions when debugging. More...
 

Detailed Description

Macro for assertions when debugging.

Macro Definition Documentation

◆ assert

#define assert (   expr)    ((void) ((expr) || (ezc_assert(__FILE__, __LINE__, #expr), 0)))

Macro for assertions when debugging.

Like normal assertions, EzC's assert expands to an expression and can be toggled via NDEBUG. assert will attempt to write to both stderr and a *.assert text file.

Parameters
exprExpression to test. As is standard, the assertion is triggered when the expression evaluates to 0.