summaryrefslogtreecommitdiff
path: root/src/user/app/init/tests/main.h
diff options
context:
space:
mode:
authordzwdz2022-07-24 15:07:57 +0200
committerdzwdz2022-07-24 15:07:57 +0200
commit9f3fdb830f61cd8c8c1f1db9d03cba1c546c1a7e (patch)
treef5ec030c736f5201332c51cb99169b288185b84b /src/user/app/init/tests/main.h
parent0228be3fd404cdebecf6d21b8964f6063f12dfbe (diff)
user: change the directory structure to prepare for multiple binaries
Diffstat (limited to 'src/user/app/init/tests/main.h')
-rw-r--r--src/user/app/init/tests/main.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/user/app/init/tests/main.h b/src/user/app/init/tests/main.h
new file mode 100644
index 0000000..ed11c5e
--- /dev/null
+++ b/src/user/app/init/tests/main.h
@@ -0,0 +1,18 @@
+#pragma once
+
+void stress_all(void);
+void test_all(void);
+
+void test_pipe(void);
+void test_semaphore(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__); \
+ _syscall_exit(0); \
+} while (0)
+#define assert(cond) if (!(cond)) test_fail();
+
+#endif