diff options
author | dzwdz | 2021-08-03 17:47:00 +0200 |
---|---|---|
committer | dzwdz | 2021-08-03 17:47:00 +0200 |
commit | 5b2bb4e025919d74090d23cbabadfeec3b1e9dc4 (patch) | |
tree | ab01b589041bf509e1fd62650d5ed2fbaba5849e /src/kernel/tests/main.c | |
parent | b2e43dd96f385e275c08ad531cd1c6bb65e2011f (diff) |
a bad testing framework
Diffstat (limited to 'src/kernel/tests/main.c')
-rw-r--r-- | src/kernel/tests/main.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/kernel/tests/main.c b/src/kernel/tests/main.c new file mode 100644 index 0000000..a7e9534 --- /dev/null +++ b/src/kernel/tests/main.c @@ -0,0 +1,19 @@ +#include <kernel/panic.h> +#include <kernel/tests/base.h> +#include <kernel/tests/tests.h> + +bool _did_tests_fail; + +TEST(basic_math) { + TEST_IF(2 + 2 == 4); + TEST_IF(2 * 2 == 4); +} + +void tests_all() { + _did_tests_fail = false; + + TEST_RUN(basic_math); + + if (_did_tests_fail) + panic(); +} |