This test ensures that calling _intersect_rect on an empty rectangle produces an empty region.
Reviewed-by: Siarhei Siamashka <[email protected]> --- test/region-test.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/region-test.c b/test/region-test.c index bfc219b..e5743e8 100644 --- a/test/region-test.c +++ b/test/region-test.c @@ -116,10 +116,19 @@ main () assert (pixman_region32_equal (&r1, &r2)); pixman_region32_fini (&r1); pixman_region32_fini (&r2); } pixman_image_unref (fill); + /* This would produce a region containing an empty + * rectangle in it. Such regions are considered malformed, + * but using an empty rectangle for initialization should + * work. + */ + pixman_region32_init_rects (&r1, boxes, 3); + pixman_region32_intersect_rect (&r1, &r1, 11, 11, 0, 0); + assert (!pixman_region32_not_empty(&r1)); + return 0; } -- 2.7.0
_______________________________________________ Pixman mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pixman
