From e97f0a3b4e27a7c9539c0423e1363ba6f3faf0c1 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Sun, 8 Aug 2021 14:53:42 -0500 Subject: change colors in test error messages to improve readability --- src/tests/hs_tests.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/hs_tests.h b/src/tests/hs_tests.h index 33285d7..15f2cb6 100644 --- a/src/tests/hs_tests.h +++ b/src/tests/hs_tests.h @@ -20,7 +20,7 @@ www.jera.com/techinfo/jtns/jtn002.html */ #define mu_assert(message, test) do { \ if (!(test)) return message \ - "\n" mu_indent " [" __FILE__ ":" STR(__LINE__) "]"; \ + "\n" mu_indent MAGENTA " [" __FILE__ ":" STR(__LINE__) "]" RESET; \ } while (0) #define mu_assert_equal(a, b) mu_assert("'" #a "' is not equal to '" #b "'", (a) == (b)) #define mu_assert_not_equal(a, b) mu_assert("'" #a "' is equal to '" #b "'", (a) != (b)) @@ -36,7 +36,7 @@ lua_close(L); \ tests_run++; \ if (message) { \ - printf(RED mu_indent "test '%s' failed: %s\n" RESET, name, message); \ + printf(RED mu_indent "test '%s' failed:" RESET " %s\n", name, message); \ tests_failed++; \ } \ } while (0) -- cgit v1.2.1