[cairo-commit] test/create-for-stream.c test/fallback-resolution.c test/multi-page.c test/ps-features.c test/svg-clip.c test/svg-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Sep 27 13:55:29 PDT 2008


 test/create-for-stream.c   |    8 ++++++--
 test/fallback-resolution.c |    8 ++++++--
 test/multi-page.c          |    4 +++-
 test/ps-features.c         |    4 +++-
 test/svg-clip.c            |    4 +++-
 test/svg-surface.c         |    4 +++-
 6 files changed, 24 insertions(+), 8 deletions(-)

New commits:
commit cca1fc6358e9d0213dd2b41a5bfd1629eec6511e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Sep 27 21:53:21 2008 +0100

    [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.

diff --git a/test/create-for-stream.c b/test/create-for-stream.c
index 5cea4ab..f085496 100644
--- a/test/create-for-stream.c
+++ b/test/create-for-stream.c
@@ -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;
 
diff --git a/test/fallback-resolution.c b/test/fallback-resolution.c
index 7c33c1e..60ff78b 100644
--- a/test/fallback-resolution.c
+++ b/test/fallback-resolution.c
@@ -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);
diff --git a/test/multi-page.c b/test/multi-page.c
index 4519437..5000280 100644
--- a/test/multi-page.c
+++ b/test/multi-page.c
@@ -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;
 
diff --git a/test/ps-features.c b/test/ps-features.c
index 43c3587..64b5c60 100644
--- a/test/ps-features.c
+++ b/test/ps-features.c
@@ -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;
     }
diff --git a/test/svg-clip.c b/test/svg-clip.c
index 0286677..255b71f 100644
--- a/test/svg-clip.c
+++ b/test/svg-clip.c
@@ -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;
     }
diff --git a/test/svg-surface.c b/test/svg-surface.c
index 9a62633..c4eadc9 100644
--- a/test/svg-surface.c
+++ b/test/svg-surface.c
@@ -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;
     }


More information about the cairo-commit mailing list