summaryrefslogtreecommitdiff
path: root/test/cairo-test.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-11 10:00:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-09-11 10:00:57 +0100
commit140ffa6e271c6e27bafbaf5edc2f026dedf4ed49 (patch)
tree0b952753bd084dff0d302663b533ee39a4d028c3 /test/cairo-test.c
parent1cf1b723c79c1359c5daccc38a90fa7b931ce818 (diff)
[test] Fix order of deleting images vs checks.
The early-checks assume that the images are still available - so it helps not to unlink them before comparing results to the previous run.
Diffstat (limited to 'test/cairo-test.c')
-rw-r--r--test/cairo-test.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 15dd251d..b9eaf36a 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -680,9 +680,6 @@ cairo_test_for_target (cairo_test_context_t *ctx,
}
}
- _xunlink (ctx, png_name);
- _xunlink (ctx, diff_name);
-
/* first *always* save the test output */
test_image = target->get_image_surface (surface,
ctx->test->width,
@@ -695,6 +692,7 @@ cairo_test_for_target (cairo_test_context_t *ctx,
goto UNWIND_CAIRO;
}
+ _xunlink (ctx, png_name);
diff_status = cairo_surface_write_to_png (test_image, png_name);
if (diff_status) {
cairo_test_log (ctx, "Error: Failed to write output image: %s\n",
@@ -795,6 +793,7 @@ cairo_test_for_target (cairo_test_context_t *ctx,
test_image, ref_image,
diff_image,
&result);
+ _xunlink (ctx, diff_name);
if (diff_status) {
cairo_test_log (ctx, "Error: Failed to compare images: %s\n",
cairo_status_to_string (diff_status));