diff options
author | Carl Worth <cworth@cworth.org> | 2007-02-01 15:21:12 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-02-01 15:21:12 -0800 |
commit | 26ef4746e66dccd8e0eb651db3e7f2826c068029 (patch) | |
tree | 0b5f791bf74dcb8bf7125d4c8b385b68422b2805 /test/nil-surface.c | |
parent | 382e021ccb657ab1e342e0d0eee402ff5eb89e5d (diff) | |
download | cairo-26ef4746e66dccd8e0eb651db3e7f2826c068029.tar.gz |
Add two tests of cairo_surface_finish to test/nil-surface.c
This tests calling cairo_surface_finish with either NULL or
with a nil surface, (either currently causes a crash).
Diffstat (limited to 'test/nil-surface.c')
-rw-r--r-- | test/nil-surface.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/nil-surface.c b/test/nil-surface.c index 80cb290cd..3ae7126a1 100644 --- a/test/nil-surface.c +++ b/test/nil-surface.c @@ -102,6 +102,17 @@ draw (cairo_t *cr, int width, int height) cairo_destroy (cr2); + /* + * 3. Test that cairo_surface_finish can accept NULL or a nil + * surface without crashing. + */ + + cairo_surface_finish (NULL); + + surface = cairo_image_surface_create_from_png ("___THIS_FILE_DOES_NOT_EXIST___"); + cairo_surface_finish (surface); + cairo_surface_destroy (surface); + return CAIRO_TEST_SUCCESS; } |