summaryrefslogtreecommitdiff
path: root/tests/test.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.h')
-rw-r--r--tests/test.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test.h b/tests/test.h
new file mode 100644
index 0000000..2fa0879
--- /dev/null
+++ b/tests/test.h
@@ -0,0 +1,12 @@
+#ifndef TEST_H
+#define TEST_H
+
+#include <covsrv/covsrv.h>
+
+#define cover_ptr(name, ...) ({covsrv_die() ? NULL : name (__VA_ARGS__);})
+
+#define mallocc(...) cover_ptr(malloc, __VA_ARGS__)
+#define callocc(...) cover_ptr(calloc, __VA_ARGS__)
+#define reallocc(...) cover_ptr(realloc, __VA_ARGS__)
+
+#endif /* TEST_H */