diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-04-07 10:42:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-04-08 07:52:46 +0100 |
commit | d0672e85ef120a4e3cd0dfcbdb717afbf9526f17 (patch) | |
tree | 4b9a25295e9519b51a4b8d88cd4237c430558849 /test/surface-source.c | |
parent | 056d3c853e6660db31ee4a50d0e990a6013aa703 (diff) | |
download | cairo-d0672e85ef120a4e3cd0dfcbdb717afbf9526f17.tar.gz |
[test/surface-source] Skip tests if we cannot create the source surface.
Check that the test environment supports the desired source and avoid
triggering asserts in the test routines.
Diffstat (limited to 'test/surface-source.c')
-rw-r--r-- | test/surface-source.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/surface-source.c b/test/surface-source.c index c7f333469..5a034ad09 100644 --- a/test/surface-source.c +++ b/test/surface-source.c @@ -89,5 +89,13 @@ draw (cairo_t *cr, int width, int height) int main (void) { + cairo_surface_t *surface; + + surface = create_source_surface (SIZE); + if (surface == NULL) /* can't create the source so skip the test */ + return CAIRO_TEST_SUCCESS; + + cairo_surface_destroy (surface); + return cairo_test (&test); } |