diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2007-03-13 16:50:10 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2007-03-13 16:50:10 -0400 |
commit | 30b5f1baa8cbd01ac0a3ff376e294775b600b4e4 (patch) | |
tree | 4d9456b460c76d859f8785867317726af5bfaeaf | |
parent | 9267cb042418250614db83bd3b2dcb0e7615af79 (diff) |
[test] In pattern-getters test, log what went wrong
-rw-r--r-- | test/pattern-getters.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/pattern-getters.c b/test/pattern-getters.c index d4014ea73..695245d66 100644 --- a/test/pattern-getters.c +++ b/test/pattern-getters.c @@ -45,8 +45,11 @@ double_buf_equal (double *a, double *b, int nc) { int i; for (i = 0; i < nc; i++) { - if (!DOUBLE_EQUALS(a[i],b[i])) + if (!DOUBLE_EQUALS(a[i],b[i])) { + cairo_test_log ("Error: doubles not equal: %g, %g\n", + a[i], b[i]); return 0; + } } return 1; } @@ -68,8 +71,11 @@ draw (cairo_t *cr, int width, int height) if (!DOUBLE_EQUALS(r,0.2) || !DOUBLE_EQUALS(g,0.3) || !DOUBLE_EQUALS(b,0.4) || - !DOUBLE_EQUALS(a,0.5)) + !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; + } cairo_pattern_destroy (pat); } @@ -83,8 +89,10 @@ draw (cairo_t *cr, int width, int height) status = cairo_pattern_get_surface (pat, &surf); CHECK_SUCCESS; - if (surf != cairo_get_target (cr)) + if (surf != cairo_get_target (cr)) { + cairo_test_log ("Error: cairo_pattern_get_resurface returned wrong surface\n"); return CAIRO_TEST_FAILURE; + } cairo_pattern_destroy (pat); } |