summaryrefslogtreecommitdiff
path: root/src/user/app/tests/tests.h
diff options
context:
space:
mode:
authordzwdz2022-08-03 00:23:50 +0200
committerdzwdz2022-08-03 00:23:50 +0200
commita2a1e4bbfcda8c1314b592c8c940e96e95cb68d4 (patch)
tree200f63d71eb07b9f9c53ab4f14b58b7b15b2f4bf /src/user/app/tests/tests.h
parentb4447c1c7bc8639774df6bd74428977908bff61e (diff)
shared: clean up printf, %u support (amongst other things)
Diffstat (limited to 'src/user/app/tests/tests.h')
-rw-r--r--src/user/app/tests/tests.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/user/app/tests/tests.h b/src/user/app/tests/tests.h
index 39294eb..5f36fe0 100644
--- a/src/user/app/tests/tests.h
+++ b/src/user/app/tests/tests.h
@@ -1,18 +1,20 @@
#pragma once
#include <camellia/syscalls.h>
#include <stdio.h>
+#include <unistd.h>
void stress_all(void);
void test_all(void);
void test_pipe(void);
+void test_printf(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__); \
+ printf("\033[31m" "TEST FAILED: %s():%u\n" "\033[0m", __func__, __LINE__); \
exit(0); \
} while (0)
#define assert(cond) if (!(cond)) test_fail();