Added the failed expression in the message
This commit is contained in:
parent
2bf960df27
commit
969e1d0915
1 changed files with 12 additions and 8 deletions
|
|
@ -35,8 +35,10 @@
|
|||
|
||||
#define ASSERT(expression) \
|
||||
do { \
|
||||
if (!(expression)) \
|
||||
if (!(expression)) { \
|
||||
std::cerr << "Assert failed: " << #expression << '\n'; \
|
||||
ASSERTFALSE; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define CHECKFALSE \
|
||||
|
|
@ -46,8 +48,10 @@
|
|||
|
||||
#define CHECK(expression) \
|
||||
do { \
|
||||
if (!(expression)) \
|
||||
if (!(expression)) { \
|
||||
std::cerr << "Check failed: " << #expression << '\n'; \
|
||||
CHECKFALSE; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#else // NDEBUG
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue