gdiplus/tests: Skip the tests if unable to load the TIFF image.

Francois Gouget fgouget at codeweavers.com
Mon Mar 4 07:35:43 CST 2013


On Windows XP most versions of gdiplus (i.e. older than 5.2) do not support TIFF.
---

gdiplus 5.2 is a post-SP3/IE8 thing.

 dlls/gdiplus/tests/image.c |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index feab70b..6b4a34c 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -3105,8 +3105,11 @@ static void test_tiff_properties(void)
     PropertyItem *prop_item;
 
     image = load_image((const BYTE *)&TIFF_data, sizeof(TIFF_data));
-    ok(image != 0, "Failed to load TIFF image data\n");
-    if (!image) return;
+    if (!image)
+    {
+        win_skip("Failed to load TIFF image data. Might not be supported. Skipping.\n");
+        return;
+    }
 
     status = GdipImageGetFrameDimensionsCount(image, &dim_count);
     expect(Ok, status);
@@ -3360,8 +3363,11 @@ static void test_tiff_palette(void)
 
     /* 1bpp TIFF without palette */
     image = load_image((const BYTE *)&TIFF_data, sizeof(TIFF_data));
-    ok(image != 0, "Failed to load TIFF image data\n");
-    if (!image) return;
+    if (!image)
+    {
+        win_skip("Failed to load TIFF image data. Might not be supported. Skipping.\n");
+        return;
+    }
 
     status = GdipGetImagePixelFormat(image, &format);
     expect(Ok, status);
-- 
1.7.10.4



More information about the wine-patches mailing list