[cairo-commit] test/pattern-getters.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Tue Jan 29 01:28:44 PST 2008


 test/pattern-getters.c |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 41a57007939a3e206647fda1b6e5a554ca125c5f
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Tue Jan 29 20:27:06 2008 +1100

    Fix undefined macro that was preventing the tests from compiling

diff --git a/test/pattern-getters.c b/test/pattern-getters.c
index 7a2f60d..aa420bf 100644
--- a/test/pattern-getters.c
+++ b/test/pattern-getters.c
@@ -66,10 +66,10 @@ draw (cairo_t *cr, int width, int height)
 	status = cairo_pattern_get_rgba (pat, &r, &g, &b, &a);
 	CHECK_SUCCESS;
 
-	if (!DOUBLE_EQUALS(r,0.2) ||
-	    !DOUBLE_EQUALS(g,0.3) ||
-	    !DOUBLE_EQUALS(b,0.4) ||
-	    !DOUBLE_EQUALS(a,0.5)) {
+	if (!CAIRO_TEST_DOUBLE_EQUALS(r,0.2) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(g,0.3) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(b,0.4) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(a,0.5)) {
 	    cairo_test_log ("Error: cairo_pattern_get_rgba returned unexepcted results: %g, %g, %g, %g\n",
 			    r, g, b, a);
 	    return CAIRO_TEST_FAILURE;
@@ -118,10 +118,10 @@ draw (cairo_t *cr, int width, int height)
 	status = cairo_pattern_get_linear_points (pat, &x0, &y0, &x1, &y1);
 	CHECK_SUCCESS;
 
-	if (!DOUBLE_EQUALS(x0,1.0) ||
-	    !DOUBLE_EQUALS(y0,2.0) ||
-	    !DOUBLE_EQUALS(x1,3.0) ||
-	    !DOUBLE_EQUALS(y1,4.0))
+	if (!CAIRO_TEST_DOUBLE_EQUALS(x0,1.0) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(y0,2.0) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(x1,3.0) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(y1,4.0))
 	    return CAIRO_TEST_FAILURE;
 
 	status = cairo_pattern_get_color_stop_count (pat, &i);
@@ -159,12 +159,12 @@ draw (cairo_t *cr, int width, int height)
 	status = cairo_pattern_get_radial_circles (pat, &a, &b, &c, &d, &e, &f);
 	CHECK_SUCCESS;
 
-	if (!DOUBLE_EQUALS(a,1.0) ||
-	    !DOUBLE_EQUALS(b,2.0) ||
-	    !DOUBLE_EQUALS(c,3.0) ||
-	    !DOUBLE_EQUALS(d,4.0) ||
-	    !DOUBLE_EQUALS(e,5.0) ||
-	    !DOUBLE_EQUALS(f,6.0))
+	if (!CAIRO_TEST_DOUBLE_EQUALS(a,1.0) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(b,2.0) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(c,3.0) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(d,4.0) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(e,5.0) ||
+	    !CAIRO_TEST_DOUBLE_EQUALS(f,6.0))
 	    return CAIRO_TEST_FAILURE;
 
 	cairo_pattern_destroy (pat);


More information about the cairo-commit mailing list