diff --git a/boilerplate/cairo-boilerplate-pdf.c b/boilerplate/cairo-boilerplate-pdf.c index e0a610e7e..0d8ac1a88 100644 --- a/boilerplate/cairo-boilerplate-pdf.c +++ b/boilerplate/cairo-boilerplate-pdf.c @@ -42,6 +42,14 @@ typedef struct _pdf_target_closure cairo_surface_t *target; } pdf_target_closure_t; +#define ARRAY_LENGTH(__array) ((int) (sizeof (__array) / sizeof (__array[0]))) +static const char *pdf_ignored_tests[] = { + "gradient-alpha", + "linear-gradient", + "text-pattern", + "trap-clip" +}; + cairo_surface_t * _cairo_boilerplate_pdf_create_surface (const char *name, cairo_content_t content, @@ -53,6 +61,13 @@ _cairo_boilerplate_pdf_create_surface (const char *name, pdf_target_closure_t *ptc; cairo_surface_t *surface; + if (mode == CAIRO_BOILERPLATE_MODE_TEST) { + int i; + for (i = 0; i < ARRAY_LENGTH (pdf_ignored_tests); i++) + if (strcmp (name, pdf_ignored_tests[i]) == 0) + return NULL; + } + /* Sanitize back to a real cairo_content_t value. */ if (content == CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED) content = CAIRO_CONTENT_COLOR_ALPHA; diff --git a/test/gradient-alpha.c b/test/gradient-alpha.c index a56b50791..6646aec41 100644 --- a/test/gradient-alpha.c +++ b/test/gradient-alpha.c @@ -29,7 +29,8 @@ 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", + "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.", 10, 10, draw }; diff --git a/test/linear-gradient.c b/test/linear-gradient.c index 7681cbf0f..71a57f671 100644 --- a/test/linear-gradient.c +++ b/test/linear-gradient.c @@ -58,7 +58,8 @@ static cairo_test_draw_function_t draw; cairo_test_t test = { "linear-gradient", - "Tests the drawing of linear gradients", + "Tests the drawing of linear gradients\n" + "PDF backend will not be tested due to limitations in poppler.", WIDTH, HEIGHT, draw }; diff --git a/test/text-pattern.c b/test/text-pattern.c index 02feb2289..99ac9fd95 100644 --- a/test/text-pattern.c +++ b/test/text-pattern.c @@ -32,7 +32,8 @@ static cairo_test_draw_function_t draw; cairo_test_t test = { "text-pattern", - "Patterned Text", + "Patterned Text\n" + "PDF backend will not be tested due to limitations in poppler.", IMAGE_WIDTH, IMAGE_HEIGHT, draw }; diff --git a/test/trap-clip.c b/test/trap-clip.c index ba4d148e5..a33985f62 100644 --- a/test/trap-clip.c +++ b/test/trap-clip.c @@ -168,7 +168,8 @@ static cairo_test_draw_function_t draw; cairo_test_t test = { "trap-clip", - "Trapezoid clipping", + "Trapezoid clipping\n" + "PDF backend will not be tested due to limitations in poppler.", IMAGE_WIDTH, IMAGE_HEIGHT, draw };