From 5a26e1f481fe85f08093a414e27c1056b85c6715 Mon Sep 17 00:00:00 2001 From: Clement Sibille Date: Thu, 9 May 2024 08:58:14 +0900 Subject: Initial commit --- tests/test_runner.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/test_runner.c (limited to 'tests/test_runner.c') 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; +} -- cgit v1.2.3