From 9be81ef43c8cfabe72fba16651dbfe62ed0f1123 Mon Sep 17 00:00:00 2001 From: Christian C Date: Fri, 7 Mar 2025 23:48:17 -0800 Subject: Testing suite --- include/test/__meta__.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/test/__meta__.h') diff --git a/include/test/__meta__.h b/include/test/__meta__.h index 05a202f..b4cc360 100644 --- a/include/test/__meta__.h +++ b/include/test/__meta__.h @@ -4,11 +4,16 @@ #include #include -#define _TEST_PASS(s,n) fprintf(stderr, "%s/%02X: \x1b[92mPASS\x1b[0m\n", s, ++n) -#define _TEST_FAIL(s,n) fprintf(stderr, "%s/%02X: \x1b[91mFAIL\x1b[0m\n", s, ++n) +#ifdef TEST_SHOW_PASS +#define _TEST_PASS(s,sub,n) fprintf(stderr, "%s/%s/%02X: \x1b[92mPASS\x1b[0m\n", s, sub, ++n) +#else +#define _TEST_PASS(s,sub,n) ++n +#endif + +#define _TEST_FAIL(s,sub,n) fprintf(stderr, "%s%s/%02X: \x1b[91mFAIL\x1b[0m\n", s, sub, ++n) #ifndef _TEST_RESULT -#define _TEST_RESULT(docstring,result,n,n_success) if (!result) {_TEST_FAIL(docstring, n);} else {_TEST_PASS(docstring,n);n_success++;} +#define _TEST_RESULT(main_string,subtest_string,result,n,n_success) if (!result) {_TEST_FAIL(main_string,subtest_string, n);} else {_TEST_PASS(main_string,subtest_string,n);n_success++;} #endif #endif -- cgit v1.2.1