From 12d0613210547b8a50dd7b21a12eb1485ee496b9 Mon Sep 17 00:00:00 2001 From: M Joonas Pihlaja Date: Thu, 3 Sep 2009 17:54:49 +0300 Subject: [test] Allow tests to XFAIL by putting the cairo_t into an error state. The test runner was extra strict about never letting a test put the cairo_t into an error state, and never would it check for the expectedness status of the failure. This patch moves the check for a test being an XFAIL above the check on the cairo_t's final status. --- test/cairo-test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/cairo-test.c b/test/cairo-test.c index 7e93410f..55e28dc7 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -1005,13 +1005,6 @@ REPEAT: goto UNWIND_CAIRO; } - if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) { - cairo_test_log (ctx, "Error: Function under test left cairo status in an error state: %s\n", - cairo_status_to_string (cairo_status (cr))); - ret = CAIRO_TEST_FAILURE; - goto UNWIND_CAIRO; - } - #if HAVE_MEMFAULT if (MEMFAULT_COUNT_FAULTS () - last_fault_count > 0 && MEMFAULT_HAS_FAULTS ()) @@ -1380,6 +1373,13 @@ REPEAT: cairo_surface_destroy (diff_image); } + if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) { + cairo_test_log (ctx, "Error: Function under test left cairo status in an error state: %s\n", + cairo_status_to_string (cairo_status (cr))); + ret = CAIRO_TEST_FAILURE; + goto UNWIND_CAIRO; + } + UNWIND_CAIRO: if (test_filename != NULL) { free (test_filename); -- cgit v1.2.3