From f257cc920801ed41e1f588a526e16d8e7915ae07 Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Wed, 5 Sep 2012 17:52:50 +0200 Subject: [PATCH] test: Add degenerate closed path case to get-path-extents This is a testcase to ensure that we do not regress https://bugs.freedesktop.org/show_bug.cgi?id=54549 (which is already fixed by b0c466e27afcec230b2c9436eeb924c05123a544). --- test/get-path-extents.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/get-path-extents.c b/test/get-path-extents.c index 7d07aab..5ea2d4a 100644 --- a/test/get-path-extents.c +++ b/test/get-path-extents.c @@ -129,6 +129,14 @@ draw (cairo_t *cr, int width, int height) cairo_new_path (cr2); cairo_move_to (cr2, 200, 400); + cairo_close_path (cr2); + phase = "Degenerate closed path"; + 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_move_to (cr2, 200, 400); cairo_rel_line_to (cr2, 0., 0.); phase = "Degenerate line"; errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0); -- 1.7.9.6 (Apple Git-31.1)