diff options
author | Carl Worth <cworth@cworth.org> | 2008-02-20 03:15:17 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-02-20 04:04:04 -0800 |
commit | 43302f0408d92138ac12afcd855d44c430074859 (patch) | |
tree | 7259cf3a3052de57f905d917b7c468d345e03fd4 /test | |
parent | 635fed77676f2446cbedfcf52a85f96e32c3a241 (diff) |
Re-enable pdf tests with gradients and add poppler-based reference images
This freezes the current (buggy) poppler result in the test suite
so that we will notice any future regressions.
Diffstat (limited to 'test')
-rw-r--r-- | test/README | 47 | ||||
-rw-r--r-- | test/gradient-alpha-pdf-argb32-ref.png | bin | 0 -> 126 bytes | |||
-rw-r--r-- | test/gradient-alpha-pdf-rgb24-ref.png | bin | 0 -> 121 bytes | |||
-rw-r--r-- | test/gradient-alpha.c | 3 | ||||
-rw-r--r-- | test/linear-gradient-pdf-ref.png | bin | 0 -> 935 bytes | |||
-rw-r--r-- | test/linear-gradient-reflect-pdf-argb32-ref.png | bin | 0 -> 248 bytes | |||
-rw-r--r-- | test/linear-gradient-reflect-pdf-rgb24-ref.png | bin | 0 -> 248 bytes | |||
-rw-r--r-- | test/linear-gradient.c | 3 | ||||
-rw-r--r-- | test/text-pattern.c | 3 | ||||
-rw-r--r-- | test/trap-clip-pdf-argb32-ref.png | bin | 0 -> 5809 bytes | |||
-rw-r--r-- | test/trap-clip-pdf-rgb24-ref.png | bin | 0 -> 5768 bytes | |||
-rw-r--r-- | test/trap-clip.c | 3 |
12 files changed, 51 insertions, 8 deletions
diff --git a/test/README b/test/README index 840e1addb..a603e9887 100644 --- a/test/README +++ b/test/README @@ -94,3 +94,50 @@ message: All XX tests passed +Some notes on limitations in poppler +------------------------------------ +One of the difficulties of our current test infrastructure is that we +rely on external tools to convert cairo's vector output (PDF, +PostScript, and SVG), into an image that can be used for the image +comparison. This means that any bugs in that conversion tool will +result in false negatives in the test suite. + +We've identified several such bugs in the poppler library which is +used to convert PDF to an image. This is particularly discouraging +because 1) poppler is free software that will be used by *many* cairo +users, and 2) poppler calls into cairo for its rendering so it should +be able to do a 100% faithful conversion. + +So we have an interest in ensuring that these poppler bugs get fixed +sooner rather than later. As such, we're trying to be good citizens by +reporting all such poppler bugs that we identify to the poppler +bugzilla. Here's a tracking bug explaining the situation: + + Poppler does not yet handle everything in the cairo test suite + https://bugs.freedesktop.org/show_bug.cgi?id=12143 + +Here's the rule: If a cairo-pdf test reports a failure, but viewing +the resulting PDF file with acroread suggests that the PDF itself is +correct, then there's likely a bug in poppler. In this case, we can +simply report the poppler bug, (making it block 12143 above), post the +PDF result from the test suite, and list the bug in this file. Once +we've done this, we can capture poppler's buggy output as a +pdf-specific reference image so that the test suite will regard the +test as passing, (and we'll ensure there is no regression). + +Once the poppler bug gets fixed, the test suite will start reporting a +false negative again, and this will be easy to fix by simply removing +the pdf-specific reference image. + +Here are the reported poppler bugs and the tests they affect: + +Poppler doesn't correctly handle gradients with transparency +https://bugs.freedesktop.org/show_bug.cgi?id=12144 +-------------------------------------------------- +gradient-alpha +linear-gradient +trap-clip +linear-gradient +linear-gradient-reflect + + diff --git a/test/gradient-alpha-pdf-argb32-ref.png b/test/gradient-alpha-pdf-argb32-ref.png Binary files differnew file mode 100644 index 000000000..bf9c69ab5 --- /dev/null +++ b/test/gradient-alpha-pdf-argb32-ref.png diff --git a/test/gradient-alpha-pdf-rgb24-ref.png b/test/gradient-alpha-pdf-rgb24-ref.png Binary files differnew file mode 100644 index 000000000..798527384 --- /dev/null +++ b/test/gradient-alpha-pdf-rgb24-ref.png diff --git a/test/gradient-alpha.c b/test/gradient-alpha.c index 6646aec41..6b762476d 100644 --- a/test/gradient-alpha.c +++ b/test/gradient-alpha.c @@ -29,8 +29,7 @@ static cairo_test_draw_function_t draw; cairo_test_t test = { "gradient-alpha", - "Tests drawing of a gradient with various alpha values in the color stops\n" - "PDF backend will not be tested due to limitations in poppler.", + "Tests drawing of a gradient with various alpha values in the color stops\n", 10, 10, draw }; diff --git a/test/linear-gradient-pdf-ref.png b/test/linear-gradient-pdf-ref.png Binary files differnew file mode 100644 index 000000000..ede7c9011 --- /dev/null +++ b/test/linear-gradient-pdf-ref.png diff --git a/test/linear-gradient-reflect-pdf-argb32-ref.png b/test/linear-gradient-reflect-pdf-argb32-ref.png Binary files differnew file mode 100644 index 000000000..46e1c0f0e --- /dev/null +++ b/test/linear-gradient-reflect-pdf-argb32-ref.png diff --git a/test/linear-gradient-reflect-pdf-rgb24-ref.png b/test/linear-gradient-reflect-pdf-rgb24-ref.png Binary files differnew file mode 100644 index 000000000..46e1c0f0e --- /dev/null +++ b/test/linear-gradient-reflect-pdf-rgb24-ref.png diff --git a/test/linear-gradient.c b/test/linear-gradient.c index 71a57f671..3dad477c7 100644 --- a/test/linear-gradient.c +++ b/test/linear-gradient.c @@ -58,8 +58,7 @@ static cairo_test_draw_function_t draw; cairo_test_t test = { "linear-gradient", - "Tests the drawing of linear gradients\n" - "PDF backend will not be tested due to limitations in poppler.", + "Tests the drawing of linear gradients\n", WIDTH, HEIGHT, draw }; diff --git a/test/text-pattern.c b/test/text-pattern.c index 99ac9fd95..15a909df0 100644 --- a/test/text-pattern.c +++ b/test/text-pattern.c @@ -32,8 +32,7 @@ static cairo_test_draw_function_t draw; cairo_test_t test = { "text-pattern", - "Patterned Text\n" - "PDF backend will not be tested due to limitations in poppler.", + "Patterned Text\n", IMAGE_WIDTH, IMAGE_HEIGHT, draw }; diff --git a/test/trap-clip-pdf-argb32-ref.png b/test/trap-clip-pdf-argb32-ref.png Binary files differnew file mode 100644 index 000000000..c3ee9971a --- /dev/null +++ b/test/trap-clip-pdf-argb32-ref.png diff --git a/test/trap-clip-pdf-rgb24-ref.png b/test/trap-clip-pdf-rgb24-ref.png Binary files differnew file mode 100644 index 000000000..f787011cb --- /dev/null +++ b/test/trap-clip-pdf-rgb24-ref.png diff --git a/test/trap-clip.c b/test/trap-clip.c index a33985f62..3712c9024 100644 --- a/test/trap-clip.c +++ b/test/trap-clip.c @@ -168,8 +168,7 @@ static cairo_test_draw_function_t draw; cairo_test_t test = { "trap-clip", - "Trapezoid clipping\n" - "PDF backend will not be tested due to limitations in poppler.", + "Trapezoid clipping\n", IMAGE_WIDTH, IMAGE_HEIGHT, draw }; |