diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-03 19:21:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-03 19:21:59 +0100 |
commit | af26560f258d93cc78782ddd0208128756874c11 (patch) | |
tree | 43c77d3b21b57cd7143a04ec73c30a8b60dc73df /test/surface-source.c | |
parent | c549203c8d69474be4362037f702e4fb59c9929e (diff) |
test: Improve memfault behaviour.
Various minor tweaks to convert asserts into error returns and to
improve error checking on intermediate surfaces.
Diffstat (limited to 'test/surface-source.c')
-rw-r--r-- | test/surface-source.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/surface-source.c b/test/surface-source.c index eb8be194..657a0c88 100644 --- a/test/surface-source.c +++ b/test/surface-source.c @@ -111,6 +111,7 @@ draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; cairo_surface_t *similar; + cairo_status_t status; cairo_t *cr2; cairo_set_source_rgb (cr, 0, 0, 0); @@ -143,21 +144,27 @@ draw (cairo_t *cr, int width, int height) cairo_fill (cr); /* destroy the surface last, as this triggers XCloseDisplay */ + cairo_surface_finish (surface); + status = cairo_surface_status (surface); cairo_surface_destroy (surface); - return CAIRO_TEST_SUCCESS; + return cairo_test_status_from_status (cairo_test_get_context (cr), + status); } static cairo_test_status_t preamble (cairo_test_context_t *ctx) { cairo_surface_t *surface; + cairo_status_t status; surface = create_source_surface (SOURCE_SIZE); if (surface == NULL) /* can't create the source so skip the test */ return CAIRO_TEST_UNTESTED; + cairo_surface_finish (surface); + status = cairo_surface_status (surface); cairo_surface_destroy (surface); - return CAIRO_TEST_SUCCESS; + return cairo_test_status_from_status (ctx, status); } |