summaryrefslogtreecommitdiff
path: root/src/init/tests/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/init/tests/main.h')
-rw-r--r--src/init/tests/main.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/init/tests/main.h b/src/init/tests/main.h
index 9a2afd2..97678e3 100644
--- a/src/init/tests/main.h
+++ b/src/init/tests/main.h
@@ -1,3 +1,15 @@
#pragma once
void test_all(void);
+void test_pipe(void);
+
+#ifdef TEST_MACROS
+
+#define argify(str) str, sizeof(str) - 1
+#define test_fail() do { \
+ printf("\033[31m" "TEST FAILED: %s:%xh\n" "\033[0m", __func__, __LINE__); \
+ return; \
+} while (0)
+#define assert(cond) if (!(cond)) test_fail();
+
+#endif