summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-02-19 10:23:46 +0100
committerBenjamin Otte <otte@redhat.com>2011-02-19 10:23:46 +0100
commit7386960d063e4a3642fb281aaae071404d837bdb (patch)
treeb0377d1e30603de395a91a5180eca7d19693b035 /test
parentb2bda24e42a3a5487177b9cb7354dc33f98da349 (diff)
test: Add a test for 0-radius negative arcs
This test checks the behavior of e46dc9e17a6f6737d5624dbcdd3c42c2353a72f1
Diffstat (limited to 'test')
-rw-r--r--test/get-path-extents.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/get-path-extents.c b/test/get-path-extents.c
index 5bd3eb70a..bd54f0ef9 100644
--- a/test/get-path-extents.c
+++ b/test/get-path-extents.c
@@ -151,12 +151,26 @@ draw (cairo_t *cr, int width, int height)
errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 200, 400, 0, 0);
cairo_new_path (cr2);
+ cairo_arc_negative (cr2, 200, 400, 0., 0, 2 * M_PI);
+ phase = "Degenerate negative arc (R=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);
+
+ cairo_new_path (cr2);
+ cairo_new_path (cr2);
cairo_arc (cr2, 200, 400, 10., 0, 0);
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, 210, 400, 0, 0);
+ cairo_arc_negative (cr2, 200, 400, 10., 0, 0);
+ phase = "Degenerate negative 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, 210, 400, 0, 0);
+
cairo_new_path (cr2);
cairo_restore (cr2);