Don't test PDF tests known to fail due to poppler limitations

The following four tests are disabled:

	gradient-alpha, linear-gradient, text-pattern, trap-clip

We don't use XFAIL as that would disable all backends, (but
we can still usefully use these tests on backends other than
PDF).
This commit is contained in:
Carl Worth 2007-04-27 16:41:17 -07:00
parent 179e339910
commit 2dcfb944b0
5 changed files with 23 additions and 4 deletions

View file

@ -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;

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};