From c8b55b3fd4924abcdf919458b0d8adb0ec00b0f2 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 26 Jul 2022 23:23:50 +0200 Subject: user: break out the shell and tests into separate binaries --- src/user/app/tests/tests.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/user/app/tests/tests.h (limited to 'src/user/app/tests/tests.h') diff --git a/src/user/app/tests/tests.h b/src/user/app/tests/tests.h new file mode 100644 index 0000000..39294eb --- /dev/null +++ b/src/user/app/tests/tests.h @@ -0,0 +1,20 @@ +#pragma once +#include +#include + +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__); \ + exit(0); \ +} while (0) +#define assert(cond) if (!(cond)) test_fail(); + +#endif -- cgit v1.2.3