aboutsummaryrefslogtreecommitdiff
path: root/test/myassert.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/myassert.h')
-rw-r--r--test/myassert.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/myassert.h b/test/myassert.h
new file mode 100644
index 0000000..01e567e
--- /dev/null
+++ b/test/myassert.h
@@ -0,0 +1,11 @@
+#define myassert(message, condition) \
+ do { \
+ if (!(condition)) { \
+ fprintf(stderr, "%s:%d:%s :: %s\n", \
+ __FILE__, \
+ __LINE__, \
+ __FUNCTION__, \
+ message); \
+ return 1; \
+ } \
+ } while (0);