From 012f68e043d3594fa6cb5235eafb1ca1bfe2d099 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 11 Feb 2008 16:48:24 +0000 Subject: [PATCH] [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. --- test/invalid-matrix.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 @@ -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)");