[cairo-commit] cairo/test cairo-test.c,1.41,1.42

Carl Worth commit at pdx.freedesktop.org
Thu Jul 14 12:50:30 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv18634/test

Modified Files:
	cairo-test.c 
Log Message:

        * test/cairo-test.c: (cairo_test_expecting),
        (cairo_test_expect_failure), (cairo_test): Make the per-backend
        test results print XFAIL rather than FAIL for expected failures.


Index: cairo-test.c
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- cairo-test.c	14 Jul 2005 19:25:42 -0000	1.41
+++ cairo-test.c	14 Jul 2005 19:50:28 -0000	1.42
@@ -482,7 +482,8 @@
 }
 
 static cairo_test_status_t
-cairo_test_real (cairo_test_t *test, cairo_test_draw_function_t draw)
+cairo_test_expecting (cairo_test_t *test, cairo_test_draw_function_t draw,
+		      cairo_test_status_t expectation)
 {
     int i;
     cairo_test_status_t status, ret;
@@ -545,7 +546,10 @@
 	    break;
 	default:
 	case CAIRO_TEST_FAILURE:
-	    printf ("FAIL\n");
+	    if (expectation == CAIRO_TEST_FAILURE)
+		printf ("XFAIL\n");
+	    else
+		printf ("FAIL\n");
 	    ret = status;
 	    break;
 	}
@@ -564,14 +568,14 @@
 			   const char		      *because)
 {
     printf ("\n%s is expected to fail:\n\t%s\n", test->name, because);
-    return cairo_test_real (test, draw);
+    return cairo_test_expecting (test, draw, CAIRO_TEST_FAILURE);
 }
 
 cairo_test_status_t
 cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw)
 {
     printf ("\n");
-    return cairo_test_real (test, draw);
+    return cairo_test_expecting (test, draw, CAIRO_TEST_SUCCESS);
 }
 
 cairo_pattern_t *




More information about the cairo-commit mailing list