Commit d84210f0 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

gdiplus/tests: Pare down image property tests that are not run for Wine.

parent 7c8a4c1c
......@@ -3679,7 +3679,7 @@ static void test_image_properties(void)
{ gifimage, sizeof(gifimage), ImageTypeBitmap, 1, 4, 4, ~0, 0x5100, ~0, 16 },
{ wmfimage, sizeof(wmfimage), ImageTypeMetafile, 0, ~0, 0, ~0, 0, ~0, -GenericError }
};
GpStatus status;
GpStatus status, expected;
GpImage *image;
UINT prop_count, prop_size, i;
PROPID prop_id[16] = { 0 };
......@@ -3750,54 +3750,35 @@ static void test_image_properties(void)
else
expect(PropertyNotFound, status);
/* FIXME: remove once Wine is fixed */
if (!(td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count)))
{
GdipDisposeImage(image);
winetest_pop_context();
continue;
}
status = GdipGetPropertyIdList(NULL, prop_count, prop_id);
expect(InvalidParameter, status);
status = GdipGetPropertyIdList(image, prop_count, NULL);
expect(InvalidParameter, status);
status = GdipGetPropertyIdList(image, 0, prop_id);
if (image_type == ImageTypeMetafile)
expect(NotImplemented, status);
else if (prop_count == 0)
expect(Ok, status);
else
expect(InvalidParameter, status);
expected = (image_type == ImageTypeMetafile) ? NotImplemented : InvalidParameter;
status = GdipGetPropertyIdList(image, prop_count - 1, prop_id);
if (image_type == ImageTypeMetafile)
expect(NotImplemented, status);
else
expect(InvalidParameter, status);
expect(expected, status);
status = GdipGetPropertyIdList(image, prop_count + 1, prop_id);
if (image_type == ImageTypeMetafile)
expect(NotImplemented, status);
else
expect(InvalidParameter, status);
expect(expected, status);
if (image_type != ImageTypeMetafile && prop_count == 0)
expected = Ok;
status = GdipGetPropertyIdList(image, 0, prop_id);
expect(expected, status);
expected = (image_type == ImageTypeMetafile) ? NotImplemented : Ok;
status = GdipGetPropertyIdList(image, prop_count, prop_id);
expect(expected, status);
status = GdipGetPropertyItemSize(image, prop_id[0], &prop_size);
if (image_type == ImageTypeMetafile)
expect(NotImplemented, status);
else
else if (prop_count == 0)
expect(PropertyNotFound, status);
/* FIXME: remove condition once Wine is fixed, i.e. this should just be an else */
else if (td[i].prop_count == prop_count || (td[i].prop_count2 != ~0 && td[i].prop_count2 == prop_count))
{
expect(Ok, status);
if (prop_count != 0)
ok(td[i].prop_id == prop_id[0] || (td[i].prop_id2 != ~0 && td[i].prop_id2 == prop_id[0]),
"expected property id %#x or %#x, got %#lx\n",
td[i].prop_id, td[i].prop_id2, prop_id[0]);
}
if (status == Ok)
{
status = GdipGetPropertyItemSize(image, prop_id[0], &prop_size);
if (prop_count == 0)
expect(PropertyNotFound, status);
else
{
expect(Ok, status);
assert(sizeof(item) >= prop_size);
......@@ -3822,7 +3803,6 @@ static void test_image_properties(void)
ok(prop_id[0] == item.data.id,
"expected property id %#lx, got %#lx\n", prop_id[0], item.data.id);
}
}
GdipDisposeImage(image);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment