From 8cdf1afb795cf4f2d6eb01fa6a533d9321adec59 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 21 Aug 2021 05:46:01 -0300 Subject: src/tests-lib.c: Move testing helper function and share it with other files --- src/gistatic.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/gistatic.c') diff --git a/src/gistatic.c b/src/gistatic.c index 2630992..fee87ee 100644 --- a/src/gistatic.c +++ b/src/gistatic.c @@ -17,27 +17,7 @@ #ifdef TEST -#define COLOUR_RESET "\033[0m" -#define COLOUR_GREEN "\033[0;32m" -#define COLOUR_YELLOW "\033[0;33m" - -static void test_start(const char *const name) { - assert(fprintf(stderr, "%s():\n", name) > 0); -} - -static void testing(const char *const message) { - assert( - fprintf( - stderr, - COLOUR_YELLOW "testing" COLOUR_RESET ": %s...", - message - ) > 0 - ); -} - -static void test_ok(void) { - assert(fprintf(stderr, " " COLOUR_GREEN "OK" COLOUR_RESET ".\n") > 0); -} +#include "tests-lib.h" #endif @@ -239,7 +219,6 @@ static const char *const STYLE_STR = "" "\n" " .logo {\n" " color: white;\n" - "\n" " }\n" "}\n" "\n" -- cgit v1.2.3