[cairo-commit] 2 commits - test/cairo-test.c

Carl Worth cworth at kemper.freedesktop.org
Thu Jul 13 15:28:23 PDT 2006


 test/cairo-test.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

New commits:
diff-tree 4b22cb41a9c1fbfc310ae7fd024ceffdb4bf3947 (from b2d04d7f1a14c961ea10b76581436ae07dfe6ef5)
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Jul 13 15:23:06 2006 -0700

    Use 'FAIL' instead of 'UNEXPECTED FAILURE' in test output.
    
    There's no ambiguity anymore due to duplicated printing, so go
    back to the classic, and easier to read wording.

diff --git a/test/cairo-test.c b/test/cairo-test.c
index 70ef852..7fea53a 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -1906,7 +1906,7 @@ cairo_test_expecting (cairo_test_t *test
 			/* eat the test name */
 			printf ("\r");
 		    }
-		    fprintf (stderr, "%s-%s-%s [%d]:\t%sUNEXPECTED FAILURE%s\n",
+		    fprintf (stderr, "%s-%s-%s [%d]:\t%sFAIL%s\n",
 			     test->name, target->name,
 			     _cairo_test_content_name (target->content), dev_offset,
 			     fail_face, normal_face);
diff-tree b2d04d7f1a14c961ea10b76581436ae07dfe6ef5 (from ff1280ce98ecc9ddee7b63e21eaec3d47ed3df8b)
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Jul 13 15:21:02 2006 -0700

    Rename no_fail_on_stdout to eliminate confusing negative inside a Boolean variable name

diff --git a/test/cairo-test.c b/test/cairo-test.c
index bcab679..70ef852 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -1637,7 +1637,7 @@ cairo_test_expecting (cairo_test_t *test
     /* we use volatile here to make sure values are not clobbered
      * by longjmp */
     volatile int i, j, num_targets;
-    volatile cairo_bool_t limited_targets = FALSE, no_fail_on_stdout = FALSE;
+    volatile cairo_bool_t limited_targets = FALSE, print_fail_on_stdout = TRUE;
     const char *tname;
     void (*old_segfault_handler)(int);
     volatile cairo_test_status_t status, ret;
@@ -1777,7 +1777,7 @@ cairo_test_expecting (cairo_test_t *test
 	fail_face = "\033[41m\033[37m\033[1m";
 	normal_face = "\033[m";
 	if (isatty (1))
-	    no_fail_on_stdout = TRUE;
+	    print_fail_on_stdout = FALSE;
     }
 #endif
 
@@ -1881,11 +1881,12 @@ cairo_test_expecting (cairo_test_t *test
 		cairo_test_log ("UNTESTED\n");
 		break;
 	    case CAIRO_TEST_CRASHED:
-		if (no_fail_on_stdout)
+		if (print_fail_on_stdout) {
+		    printf ("CRASHED\n");
+		} else {
 		    /* eat the test name */
 		    printf ("\r");
-		else
-		    printf ("CRASHED\n");
+		}
 		cairo_test_log ("CRASHED\n");
 		fprintf (stderr, "%s-%s-%s [%d]:\t%s!!!TEST-CASE CRASH!!!%s\n",
 			 test->name, target->name,
@@ -1899,11 +1900,12 @@ cairo_test_expecting (cairo_test_t *test
 		    printf ("XFAIL\n");
 		    cairo_test_log ("XFAIL\n");
 		} else {
-		    if (no_fail_on_stdout)
+		    if (print_fail_on_stdout) {
+			printf ("FAIL\n");
+		    } else {
 			/* eat the test name */
 			printf ("\r");
-		    else
-			printf ("FAIL\n");
+		    }
 		    fprintf (stderr, "%s-%s-%s [%d]:\t%sUNEXPECTED FAILURE%s\n",
 			     test->name, target->name,
 			     _cairo_test_content_name (target->content), dev_offset,


More information about the cairo-commit mailing list