From c0fa2619b1f57e38b9200c1725b5e6f593d7e5e5 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Sat, 19 Apr 2014 14:37:51 -0700 Subject: [PATCH] colorize PASS and FAIL --- src/__tests__/Layout-test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/__tests__/Layout-test.c b/src/__tests__/Layout-test.c index 4ad6e4f5..fffaa9d3 100644 --- a/src/__tests__/Layout-test.c +++ b/src/__tests__/Layout-test.c @@ -23,11 +23,10 @@ bool are_layout_equal(css_node_t *a, css_node_t *b) { void test(const char *name, css_node_t *style, css_node_t *expected_layout) { layoutNode(style); - printf("%s\n", name); if (!are_layout_equal(style, expected_layout)) { - printf("FAIL\n"); + printf("%sFAIL%s %s\n", "\x1B[31m", "\x1B[0m", name); } else { - printf("PASS\n"); + printf("%sPASS%s %s\n", "\x1B[32m", "\x1B[0m", name); } free_css_node(style);