aboutsummaryrefslogtreecommitdiff
path: root/cassert
diff options
context:
space:
mode:
Diffstat (limited to 'cassert')
-rw-r--r--cassert/include/cassert.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/cassert/include/cassert.h b/cassert/include/cassert.h
index acfcb0f..bb98f50 100644
--- a/cassert/include/cassert.h
+++ b/cassert/include/cassert.h
@@ -7,25 +7,25 @@
7#ifndef LOGE 7#ifndef LOGE
8#include <stdio.h> 8#include <stdio.h>
9// __VA_OPT__ is not available until C2X. 9// __VA_OPT__ is not available until C2X.
10#define LOGE(format, ...) \ 10/*#define LOGE(format, ...) \
11 { \ 11 { \
12 fprintf( \ 12 fprintf( \
13 stderr, "[ASSERT] %s:%d " format "\n", __FILE__, \ 13 stderr, "[ASSERT] %s:%d " format "\n", __FILE__, \
14 __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ 14 __LINE__ __VA_OPT__(, ) __VA_ARGS__); \
15 } 15 }*/
16/*#define LOGE(...) \ 16#define LOGE(...) \
17 { \ 17 { \
18 fprintf(stderr, "[ASSERT] %s:%d ", __FILE__, __LINE__); \ 18 fprintf(stderr, "[ASSERT] %s:%d ", __FILE__, __LINE__); \
19 fprintf(stderr, __VA_ARGS__); \ 19 fprintf(stderr, __VA_ARGS__); \
20 fprintf(stderr, "\n"); \ 20 fprintf(stderr, "\n"); \
21 }*/ 21 }
22#endif // LOGE 22#endif // LOGE
23 23
24#define TRAP() raise(SIGTRAP) 24#define TRAP() raise(SIGTRAP)
25 25
26/// Unconditional hard assert. 26/// Unconditional hard assert.
27#define FAIL(format, ...) \ 27#define FAIL(...) \
28 LOGE(format, __VA_ARGS__); \ 28 LOGE(__VA_ARGS__); \
29 TRAP(); 29 TRAP();
30 30
31//// Conditional hard assert. 31//// Conditional hard assert.