diff options
author | Christian C <cc@localhost> | 2025-03-08 00:57:18 -0800 |
---|---|---|
committer | Christian C <cc@localhost> | 2025-03-08 00:57:18 -0800 |
commit | ca175dffc05aa1b00641647272aa7ab3d1201565 (patch) | |
tree | c6665b923e2ead8bb41e6f8ef8261cc7dbc24138 /test | |
parent | 688c2454c55acf8720f2403ae574318f1941732f (diff) |
Test minor restructure
Diffstat (limited to 'test')
-rw-r--r-- | test/test.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test.c b/test/test.c new file mode 100644 index 0000000..40e2d6f --- /dev/null +++ b/test/test.c @@ -0,0 +1,30 @@ +#include <test/lib/color.h> +#include <test/lib/dir.h> +#include <test/lib/time.h> + +#define _META_TEST_RESULT(name,result) if (result) { fprintf(stderr, " \x1b[92mPASS\x1b[0m %s\n", name);} else { fprintf(stderr, "%s: \x1b[91mFAIL\x1b[0m\n", name);} + +int main() +{ + bool_t all_success = TRUE; + bool_t test_success; + // lib/color.c Test + test_success = TEST_lib_color(); + all_success &= test_success; + _META_TEST_RESULT("LIB/COLOR", test_success) + + // lib/dir.c Test + test_success = TEST_lib_dir(); + all_success &= test_success; + _META_TEST_RESULT("LIB/DIR", test_success) + + // lib/time.c Test + test_success = TEST_lib_time(); + all_success &= test_success; + _META_TEST_RESULT("LIB/TIME", test_success) + + if (all_success == TRUE) { + return 0; + } + return 1; +} |