summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-07-10 17:36:07 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-07-10 17:36:07 +0200
commitb52193977e07506e58d8e32fbbe90016d4a67ebc (patch)
treec31b594c4949af109213f885d3980b83c97f6551
parente40daec29aa738f18e86a93c087e1d1b584e4f5d (diff)
Colorize test outcome
-rw-r--r--test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test.c b/test.c
index 83d265e..0dde686 100644
--- a/test.c
+++ b/test.c
@@ -32,7 +32,7 @@ struct config {
/* The following lines make up our testing "framework" :) */
static int tests = 0, fails = 0;
#define test(_s) { printf("#%02d ", ++tests); printf(_s); }
-#define test_cond(_c) if(_c) printf("PASSED\n"); else {printf("FAILED\n"); fails++;}
+#define test_cond(_c) if(_c) printf("\033[0;32mPASSED\033[0;0m\n"); else {printf("\033[0;31mFAILED\033[0;0m\n"); fails++;}
static long long usec(void) {
struct timeval tv;