From c95de81d379a17c43b0494031e45a5bb80d45452 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Sat, 19 Apr 2014 14:41:42 -0700 Subject: [PATCH] print what when wrong in case of errors --- src/__tests__/Layout-test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/__tests__/Layout-test.c b/src/__tests__/Layout-test.c index fffaa9d3..f09e6e87 100644 --- a/src/__tests__/Layout-test.c +++ b/src/__tests__/Layout-test.c @@ -25,6 +25,14 @@ void test(const char *name, css_node_t *style, css_node_t *expected_layout) { if (!are_layout_equal(style, expected_layout)) { printf("%sFAIL%s %s\n", "\x1B[31m", "\x1B[0m", name); + + printf("Input: "); + print_style(style, 0); + printf("Output: "); + print_layout(style, 0); + + printf("Expected: "); + print_layout(expected_layout, 0); } else { printf("%sPASS%s %s\n", "\x1B[32m", "\x1B[0m", name); }