From a9345276096444bcc1ecc8f9ec0c33b49e7a6e7a Mon Sep 17 00:00:00 2001 From: Massimo Valentini Date: Fri, 16 Jan 2015 12:56:04 +0100 Subject: [PATCH] add a test to exercise tor22 spans allocation code path --- test/Makefile.sources | 1 + test/bug-75705.c | 32 ++++++++++++++++++++++++++++++++ test/reference/bug-75705.ref.png | Bin 0 -> 97 bytes 3 files changed, 33 insertions(+) create mode 100644 test/bug-75705.c create mode 100644 test/reference/bug-75705.ref.png diff --git a/test/Makefile.sources b/test/Makefile.sources index e4fedb4..52f7fc1 100644 --- a/test/Makefile.sources +++ b/test/Makefile.sources @@ -26,6 +26,7 @@ test_sources = \ bilevel-image.c \ bug-40410.c \ bug-51910.c \ + bug-75705.c \ bug-84115.c \ bug-bo-rectangular.c \ bug-bo-collins.c \ diff --git a/test/bug-75705.c b/test/bug-75705.c new file mode 100644 index 0000000..e140ff9 --- /dev/null +++ b/test/bug-75705.c @@ -0,0 +1,32 @@ +#include "cairo-test.h" + +static cairo_test_status_t +draw (cairo_t *cr, int width, int height) +{ + double dsh[2] = {1,3}; + + cairo_set_source_rgba (cr, 0, 0, 0, 1); + cairo_paint (cr); + + cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); + + cairo_move_to (cr, 3, 3); + /* struct glitter_scan_converter spans_embedded array size is 64 */ + cairo_line_to (cr, 65+3, 3); + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_FAST); + cairo_set_tolerance (cr, 1); + + cairo_set_dash (cr, dsh, 2, 0); + cairo_set_line_width (cr, 2); + + cairo_stroke (cr); + return CAIRO_TEST_SUCCESS; +} + +CAIRO_TEST (bug_75705, + "Bug 75705 (exercise tor22-scan-converter)", + "dash, stroke, antialias", /* keywords */ + NULL, /* requirements */ + 72, 8, + NULL, draw) diff --git a/test/reference/bug-75705.ref.png b/test/reference/bug-75705.ref.png new file mode 100644 index 0000000000000000000000000000000000000000..c0ac5ff6480924a468fd7fe8fdd184eeef64369e GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^9ze{&!2~3)Ue~JuQfx`y?k)`fL2$v|<&%LTVxBIJ qAr`&K2@