[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.
This commit is contained in:
Chris Wilson 2008-02-11 16:48:24 +00:00
parent eb7488e1e6
commit 012f68e043

View file

@ -235,6 +235,22 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \
CHECK_STATUS (status, "cairo_scale(NaN, 1)");
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)");