summaryrefslogtreecommitdiff
path: root/test/in-fill-empty-trapezoid.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-05-08 18:19:56 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-05-08 22:04:51 +0100
commit069514a10ff2ca9ac86cc3dc1703aa19caa538e2 (patch)
tree58295f16c157bc1e9a9b7956a344dd32d485da67 /test/in-fill-empty-trapezoid.c
parent43645eb486da1af91b3264af6c84ac18a1eddcaa (diff)
downloadcairo-069514a10ff2ca9ac86cc3dc1703aa19caa538e2.tar.gz
[test/in-fill-empty-trapezoid] Cleanup after test failure.
Ensure that the failure path also calls cairo_test_fini().
Diffstat (limited to 'test/in-fill-empty-trapezoid.c')
-rw-r--r--test/in-fill-empty-trapezoid.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/in-fill-empty-trapezoid.c b/test/in-fill-empty-trapezoid.c
index 61fdb70ea..45051f8dd 100644
--- a/test/in-fill-empty-trapezoid.c
+++ b/test/in-fill-empty-trapezoid.c
@@ -47,6 +47,7 @@ main (void)
cairo_status_t status;
char const * description =
"Test that the tessellator isn't producing obviously empty trapezoids";
+ cairo_test_status_t ret;
cairo_test_init ("in-fill-empty-trapezoid");
cairo_test_log ("%s\n", description);
@@ -81,20 +82,21 @@ main (void)
cairo_surface_destroy (surf);
/* Check that everything went well. */
+ ret = CAIRO_TEST_SUCCESS;
if (CAIRO_STATUS_SUCCESS != status) {
cairo_test_log ("Failed to create a test surface and path: %s\n",
cairo_status_to_string (status));
- return CAIRO_TEST_FAILURE;
+ ret = CAIRO_TEST_FAILURE;
}
if (0 != false_positive_count) {
cairo_test_log ("Point sampling found %d false positives "
"from cairo_in_fill()\n",
false_positive_count);
- return CAIRO_TEST_FAILURE;
+ ret = CAIRO_TEST_FAILURE;
}
cairo_test_fini ();
- return CAIRO_TEST_SUCCESS;
+ return ret;
}