summaryrefslogtreecommitdiff
path: root/test/invalid-matrix.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-02-11 16:48:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-02-15 13:50:43 +0000
commit012f68e043d3594fa6cb5235eafb1ca1bfe2d099 (patch)
treefbe91ea92c2e2856aeafd49b90622e296380ad66 /test/invalid-matrix.c
parenteb7488e1e67b872d29d1bd459bb7994ad3789576 (diff)
downloadcairo-012f68e043d3594fa6cb5235eafb1ca1bfe2d099.tar.gz
[test/invalid-matrix] Check scale(0,0)
Test that INVALID_MATRIX is returned if the user calls cairo_scale(0,0) or a variant thereof.
Diffstat (limited to 'test/invalid-matrix.c')
-rw-r--r--test/invalid-matrix.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/invalid-matrix.c b/test/invalid-matrix.c
index 77534e7a3..08a81fef7 100644
--- a/test/invalid-matrix.c
+++ b/test/invalid-matrix.c
@@ -236,6 +236,22 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \
cairo_destroy (cr2);
cr2 = cairo_create (target);
+ cairo_scale (cr2, bogus.xx, bogus.yy);
+ CHECK_STATUS (status, "cairo_scale(0, 0)");
+ cairo_destroy (cr2);
+
+ cr2 = cairo_create (target);
+ cairo_scale (cr2, 1, bogus.yy);
+ CHECK_STATUS (status, "cairo_scale(1, 0)");
+ cairo_destroy (cr2);
+
+ cr2 = cairo_create (target);
+ cairo_scale (cr2, bogus.xx, 1);
+ CHECK_STATUS (status, "cairo_scale(0, 1)");
+ cairo_destroy (cr2);
+
+
+ cr2 = cairo_create (target);
cairo_rotate (cr2, bogus.xx);
CHECK_STATUS (status, "cairo_rotate(NaN)");
cairo_destroy (cr2);