summaryrefslogtreecommitdiff
path: root/test/nil-surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/nil-surface.c')
-rw-r--r--test/nil-surface.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/nil-surface.c b/test/nil-surface.c
index c672e6474..9f10d0ea4 100644
--- a/test/nil-surface.c
+++ b/test/nil-surface.c
@@ -136,6 +136,25 @@ draw (cairo_t *cr, int width, int height)
cairo_destroy (cr2);
+ /*
+ * 5. Create a cairo_t for the NULL surface.
+ */
+ cr2 = cairo_create (NULL);
+
+ if (cairo_status (cr2) != CAIRO_STATUS_NULL_POINTER) {
+ cairo_test_log ("Error: Received status of \"%s\" rather than expected \"%s\"\n",
+ cairo_status_to_string (cairo_status (cr2)),
+ cairo_status_to_string (CAIRO_STATUS_NULL_POINTER));
+ return CAIRO_TEST_FAILURE;
+ }
+
+ /* Test that push_group doesn't crash */
+ cairo_push_group (cr2);
+ cairo_stroke (cr2);
+ cairo_pop_group (cr2);
+
+ cairo_destroy (cr2);
+
return CAIRO_TEST_SUCCESS;
}