diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2020-06-03 11:47:13 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-06-03 11:47:13 +0100 |
commit | 107bf1f4be045fa1f8f2fe649c0b3d97c8d39d5a (patch) | |
tree | 00aa43967dffc509ab771f7495565e3285c54bff /tests/clar | |
parent | d4b953f80005bc08c790ffe3ef0776ced370706c (diff) | |
download | libgit2-107bf1f4be045fa1f8f2fe649c0b3d97c8d39d5a.tar.gz |
clar: print indirection
Diffstat (limited to 'tests/clar')
-rw-r--r-- | tests/clar/print.h | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/tests/clar/print.h b/tests/clar/print.h index 2e2b6202c..5c8857c51 100644 --- a/tests/clar/print.h +++ b/tests/clar/print.h @@ -1,12 +1,12 @@ -static void clar_print_init(int test_count, int suite_count, const char *suite_names) +static void clar_print_cl_init(int test_count, int suite_count, const char *suite_names) { (void)test_count; printf("Loaded %d suites: %s\n", (int)suite_count, suite_names); printf("Started (test status codes: OK='.' FAILURE='F' SKIPPED='S')\n"); } -static void clar_print_shutdown(int test_count, int suite_count, int error_count) +static void clar_print_cl_shutdown(int test_count, int suite_count, int error_count) { (void)test_count; (void)suite_count; @@ -16,7 +16,7 @@ static void clar_print_shutdown(int test_count, int suite_count, int error_count clar_report_all(); } -static void clar_print_error(int num, const struct clar_report *report, const struct clar_error *error) +static void clar_print_cl_error(int num, const struct clar_report *report, const struct clar_error *error) { printf(" %d) Failure:\n", num); @@ -35,7 +35,7 @@ static void clar_print_error(int num, const struct clar_report *report, const st fflush(stdout); } -static void clar_print_ontest(const char *test_name, int test_number, enum cl_test_status status) +static void clar_print_cl_ontest(const char *test_name, int test_number, enum cl_test_status status) { (void)test_name; (void)test_number; @@ -50,7 +50,7 @@ static void clar_print_ontest(const char *test_name, int test_number, enum cl_te fflush(stdout); } -static void clar_print_onsuite(const char *suite_name, int suite_index) +static void clar_print_cl_onsuite(const char *suite_name, int suite_index) { if (_clar.report_suite_names) printf("\n%s", suite_name); @@ -58,10 +58,40 @@ static void clar_print_onsuite(const char *suite_name, int suite_index) (void)suite_index; } +static void clar_print_cl_onabort(const char *fmt, va_list arg) +{ + vfprintf(stderr, fmt, arg); +} + +static void clar_print_init(int test_count, int suite_count, const char *suite_names) +{ + clar_print_cl_init(test_count, suite_count, suite_names); +} + +static void clar_print_shutdown(int test_count, int suite_count, int error_count) +{ + clar_print_cl_shutdown(test_count, suite_count, error_count); +} + +static void clar_print_error(int num, const struct clar_report *report, const struct clar_error *error) +{ + clar_print_cl_error(num, report, error); +} + +static void clar_print_ontest(const char *test_name, int test_number, enum cl_test_status status) +{ + clar_print_cl_ontest(test_name, test_number, status); +} + +static void clar_print_onsuite(const char *suite_name, int suite_index) +{ + clar_print_cl_onsuite(suite_name, suite_index); +} + static void clar_print_onabort(const char *msg, ...) { va_list argp; va_start(argp, msg); - vfprintf(stderr, msg, argp); + clar_print_cl_onabort(msg, argp); va_end(argp); } |