aboutsummaryrefslogtreecommitdiff
path: root/test/myassert.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-11-13 16:48:03 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-11-13 16:48:03 -0500
commit244fa85e98fa6f325025f49aca6e1fbb1e440582 (patch)
tree502ab3bbfb49749fad1cfaa5f2e20268d3f5c5e4 /test/myassert.h
parente801b594a18dbaf9283ad860c86e4a07b2b1e866 (diff)
downloadreloc-244fa85e98fa6f325025f49aca6e1fbb1e440582.tar.gz
Decouple main program and add initial tests
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);