diff options
Diffstat (limited to 'test/svg-clip.c')
-rw-r--r-- | test/svg-clip.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/svg-clip.c b/test/svg-clip.c index 77ae9e98..0dfab4d8 100644 --- a/test/svg-clip.c +++ b/test/svg-clip.c @@ -106,16 +106,20 @@ test_clip (cairo_t *cr, double width, double height) int main (void) { + cairo_test_context_t ctx; cairo_t *cr; const char *filename = "svg-clip.svg"; cairo_surface_t *surface; - cairo_test_init ("svg-clip"); + cairo_test_init (&ctx, "svg-clip"); surface = cairo_svg_surface_create (filename, WIDTH_IN_POINTS, HEIGHT_IN_POINTS); - if (surface == NULL) { - fprintf (stderr, "Failed to create svg surface for file %s\n", filename); + if (cairo_surface_status (surface)) { + cairo_test_log (&ctx, + "Failed to create svg surface for file %s: %s\n", + filename, cairo_status_to_string (cairo_surface_status (surface))); + cairo_test_fini (&ctx); return CAIRO_TEST_FAILURE; } @@ -130,7 +134,7 @@ main (void) printf ("svg-clip: Please check %s to make sure it looks happy.\n", filename); - cairo_test_fini (); + cairo_test_fini (&ctx); - return 0; + return CAIRO_TEST_SUCCESS; } |