summaryrefslogtreecommitdiffstats
path: root/tests/test_runner.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/test_runner.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_runner.c b/tests/test_runner.c
new file mode 100644
index 0000000..f05cd02
--- /dev/null
+++ b/tests/test_runner.c
@@ -0,0 +1,17 @@
+#include "test.h"
+
+#define ANSI_COLOR_GREEN "\x1b[32m"
+#define ANSI_COLOR_RESET "\x1b[0m"
+
+int main(int argc, char **argv) {
+ (void)argc;
+ (void)argv;
+
+ for (size_t i = 0; i < test_count; i++) {
+ fprintf(stderr, "Running test: %s...\n", tests[i].name);
+ tests[i].fn();
+ fprintf(stderr, ANSI_COLOR_GREEN " OK" ANSI_COLOR_RESET "\n");
+ }
+
+ return 0;
+}
Go back to lisible.xyz