perf: Bail if cairo_status returns non-success at the end of a test.

This commit is contained in:
Carl Worth 2006-10-04 16:35:20 -07:00
parent d15b8f2d6e
commit bda77f505c

View file

@ -214,8 +214,16 @@ main (int argc, char *argv[])
target->closure);
perf.cr = cairo_create (surface);
perf_case->run (&perf, perf.cr, perf.size, perf.size);
if (cairo_status (perf.cr)) {
fprintf (stderr, "Error: Test left cairo in an error state: %s\n",
cairo_status_to_string (cairo_status (perf.cr)));
exit (1);
}
cairo_destroy (perf.cr);
cairo_surface_destroy (surface);
}
}