summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2010-10-15 21:51:12 +0200
committerAndrea Canciani <ranma42@gmail.com>2010-10-29 17:31:21 +0200
commitac7b2a972097f4080ab6e5a29974c830b8b57a4f (patch)
tree4d8440e51028e3002b4182a11449852e0111865e /test
parent253374d6ada14796b5ec55ceb7983de62be34f62 (diff)
test: Fix get-path-extents
The test was considering all the empty rects equals, but this is not correct when testing the results of cairo_path_extents().
Diffstat (limited to 'test')
-rw-r--r--test/get-path-extents.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/get-path-extents.c b/test/get-path-extents.c
index a3e9554d..7a09317d 100644
--- a/test/get-path-extents.c
+++ b/test/get-path-extents.c
@@ -61,10 +61,6 @@ check_extents (const cairo_test_context_t *ctx,
if (cairo_status (cr))
return 1;
- /* let empty rects match */
- if ((ext_x1 == ext_x2 || ext_y1 == ext_y2) && (width == 0 || height == 0))
- return 1;
-
switch (relation) {
default:
case EQUALS:
@@ -159,7 +155,7 @@ draw (cairo_t *cr, int width, int height)
phase = "Degenerate arc (Θ=0)";
errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, 0, 0, 0, 0);
- errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 200, 400, 0, 0);
+ errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 210, 400, 0, 0);
cairo_new_path (cr2);
cairo_restore (cr2);
@@ -199,7 +195,7 @@ draw (cairo_t *cr, int width, int height)
cairo_line_to (cr2, 750, 180);
errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, -5, 175, 760, 10);
- errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 0, 180, 755, 0);
+ errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 0, 180, 750, 0);
cairo_new_path (cr2);
cairo_restore (cr2);