diff options
| author | Clement Sibille <clements+git@lisible.xyz> | 2024-05-09 08:58:14 +0900 |
|---|---|---|
| committer | Clement Sibille <clements+git@lisible.xyz> | 2024-05-09 08:58:14 +0900 |
| commit | 5a26e1f481fe85f08093a414e27c1056b85c6715 (patch) | |
| tree | 20a2384554cfcb437a4b604e02b4a9978507cafc /tests/test_runner.c | |
Initial commit
Diffstat (limited to '')
| -rw-r--r-- | tests/test_runner.c | 17 |
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; +} |
