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

On Windows XP most versions of gdiplus (i.e. older than 5.2) do not support TIFF.
This commit is contained in:
Francois Gouget 2013-03-04 14:35:43 +01:00 committed by Alexandre Julliard
parent 4391deb930
commit 06489c6501
1 changed files with 10 additions and 4 deletions

View File

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