Describe what check() and expect() are
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
eb35abfa52
commit
da805eec83
@ -7,6 +7,7 @@
|
||||
#define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
|
||||
#endif
|
||||
|
||||
// Like check(), but with a custom error message.
|
||||
#define expect(expr, message) \
|
||||
do { \
|
||||
if (!(expr)) [[unlikely]] \
|
||||
@ -15,6 +16,7 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
// Like assert(), but always enabled.
|
||||
#define check(expr) \
|
||||
do { \
|
||||
if (!(expr)) [[unlikely]] \
|
||||
|
Loading…
Reference in New Issue
Block a user