libfort/tests/tests.c

17 lines
587 B
C
Raw Permalink Normal View History

2018-11-24 21:14:26 +01:00
#include "tests.h"
2018-12-29 16:32:40 +01:00
void run_test_suite(const char *test_suite_name, int n_tests, struct test_case test_suite[])
2018-11-24 21:14:26 +01:00
{
2018-12-29 16:32:40 +01:00
fprintf(stderr, " == RUNNING %s ==\n", test_suite_name);
2018-11-24 21:14:26 +01:00
fprintf(stderr, "[==========] Running %d test(s).\n", n_tests);
int i;
for (i = 0; i < n_tests; ++i) {
2018-12-29 16:32:40 +01:00
fprintf(stderr, "[ RUN ] %s\n", test_suite[i].name);
test_suite[i].test();
fprintf(stderr, "[ OK ] %s\n", test_suite[i].name);
2018-11-24 21:14:26 +01:00
}
fprintf(stderr, "[==========] %d test(s) run.\n", n_tests);
fprintf(stderr, "[ PASSED ] %d test(s).\n", n_tests);
}