mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-08 23:30:21 +01:00
[test/in-fill-empty-trapezoid] Cleanup after test failure.
Ensure that the failure path also calls cairo_test_fini().
This commit is contained in:
parent
43645eb486
commit
069514a10f
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue