mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 00:38:06 +02:00
[test] Fix target specific tests for recent SVG/PS version split.
A few tests explicitly checked whether the "ps" or "svg" target was enabled and this broke because of the name change. So fixup, to run the generic test if either PS or SVG target is enabled as appropriate.
This commit is contained in:
parent
39e4a0bcd0
commit
cca1fc6358
6 changed files with 24 additions and 8 deletions
|
|
@ -243,7 +243,9 @@ main (void)
|
|||
cairo_test_init (&ctx, test_name);
|
||||
|
||||
#if CAIRO_HAS_PS_SURFACE
|
||||
if (cairo_test_is_target_enabled (&ctx, "ps")) {
|
||||
if (cairo_test_is_target_enabled (&ctx, "ps2") ||
|
||||
cairo_test_is_target_enabled (&ctx, "ps3"))
|
||||
{
|
||||
if (status == CAIRO_TEST_UNTESTED)
|
||||
status = CAIRO_TEST_SUCCESS;
|
||||
|
||||
|
|
@ -275,7 +277,9 @@ main (void)
|
|||
#endif
|
||||
|
||||
#if CAIRO_HAS_SVG_SURFACE
|
||||
if (cairo_test_is_target_enabled (&ctx, "svg")) {
|
||||
if (cairo_test_is_target_enabled (&ctx, "svg11") ||
|
||||
cairo_test_is_target_enabled (&ctx, "svg12"))
|
||||
{
|
||||
if (status == CAIRO_TEST_UNTESTED)
|
||||
status = CAIRO_TEST_SUCCESS;
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,9 @@ main (void)
|
|||
break;
|
||||
case PS:
|
||||
#if CAIRO_HAS_PS_SURFACE
|
||||
if (cairo_test_is_target_enabled (&ctx, "ps")) {
|
||||
if (cairo_test_is_target_enabled (&ctx, "ps2") ||
|
||||
cairo_test_is_target_enabled (&ctx, "ps3"))
|
||||
{
|
||||
surface = cairo_ps_surface_create (backend_filename[backend],
|
||||
SIZE, SIZE);
|
||||
cairo_boilerplate_ps_surface_force_fallbacks (surface);
|
||||
|
|
@ -138,7 +140,9 @@ main (void)
|
|||
break;
|
||||
case SVG:
|
||||
#if CAIRO_HAS_SVG_SURFACE
|
||||
if (cairo_test_is_target_enabled (&ctx, "svg")) {
|
||||
if (cairo_test_is_target_enabled (&ctx, "svg11") ||
|
||||
cairo_test_is_target_enabled (&ctx, "svg12"))
|
||||
{
|
||||
surface = cairo_svg_surface_create (backend_filename[backend],
|
||||
SIZE, SIZE);
|
||||
cairo_boilerplate_svg_surface_force_fallbacks (surface);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,9 @@ main (void)
|
|||
cairo_test_init (&ctx, "multi-page");
|
||||
|
||||
#if CAIRO_HAS_PS_SURFACE
|
||||
if (cairo_test_is_target_enabled (&ctx, "ps")) {
|
||||
if (cairo_test_is_target_enabled (&ctx, "ps2") ||
|
||||
cairo_test_is_target_enabled (&ctx, "ps3"))
|
||||
{
|
||||
if (result == CAIRO_TEST_UNTESTED)
|
||||
result = CAIRO_TEST_SUCCESS;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,9 @@ main (void)
|
|||
char dsc[255];
|
||||
|
||||
cairo_test_init (&ctx, "ps-features");
|
||||
if (! cairo_test_is_target_enabled (&ctx, "ps")) {
|
||||
if (! (cairo_test_is_target_enabled (&ctx, "ps2") ||
|
||||
cairo_test_is_target_enabled (&ctx, "ps3")))
|
||||
{
|
||||
cairo_test_fini (&ctx);
|
||||
return CAIRO_TEST_UNTESTED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,9 @@ main (void)
|
|||
cairo_surface_t *surface;
|
||||
|
||||
cairo_test_init (&ctx, "svg-clip");
|
||||
if (! cairo_test_is_target_enabled (&ctx, "svg")) {
|
||||
if (! (cairo_test_is_target_enabled (&ctx, "svg11") ||
|
||||
cairo_test_is_target_enabled (&ctx, "svg12")))
|
||||
{
|
||||
cairo_test_fini (&ctx);
|
||||
return CAIRO_TEST_UNTESTED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,9 @@ main (void)
|
|||
cairo_surface_t *surface;
|
||||
|
||||
cairo_test_init (&ctx, "svg-surface");
|
||||
if (! cairo_test_is_target_enabled (&ctx, "svg")) {
|
||||
if (! (cairo_test_is_target_enabled (&ctx, "svg11") ||
|
||||
cairo_test_is_target_enabled (&ctx, "svg12")))
|
||||
{
|
||||
cairo_test_fini (&ctx);
|
||||
return CAIRO_TEST_UNTESTED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue