From: Jeff Smith whydoubt@gmail.com
--- dlls/windowscodecs/tests/gifformat.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/tests/gifformat.c b/dlls/windowscodecs/tests/gifformat.c index 8488f486a11..3f60d35a70f 100644 --- a/dlls/windowscodecs/tests/gifformat.c +++ b/dlls/windowscodecs/tests/gifformat.c @@ -130,7 +130,7 @@ static void test_global_gif_palette(void) IWICBitmapFrameDecode *frame; IWICPalette *palette; GUID format; - UINT count, ret; + UINT count, ret, i; WICColor color[256];
decoder = create_decoder(gif_global_palette, sizeof(gif_global_palette)); @@ -147,6 +147,8 @@ static void test_global_gif_palette(void) ok(hr == S_OK, "GetColorCount error %#lx\n", hr); ok(count == 4, "expected 4, got %u\n", count);
+ for (i = 0; i < 256; i++) + color[i] = 0xdeadbeef; hr = IWICPalette_GetColors(palette, count, color, &ret); ok(hr == S_OK, "GetColors error %#lx\n", hr); ok(ret == count, "expected %u, got %u\n", count, ret); @@ -154,6 +156,8 @@ static void test_global_gif_palette(void) ok(color[1] == 0x00040506, "expected 0x00040506, got %#x\n", color[1]); ok(color[2] == 0xff070809, "expected 0xff070809, got %#x\n", color[2]); ok(color[3] == 0xff0a0b0c, "expected 0xff0a0b0c, got %#x\n", color[3]); + for (i = 4; i < 256; i++) + ok(color[i] == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", color[i]);
/* frame palette */ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); @@ -171,6 +175,8 @@ static void test_global_gif_palette(void) ok(hr == S_OK, "GetColorCount error %#lx\n", hr); ok(count == 4, "expected 4, got %u\n", count);
+ for (i = 0; i < 256; i++) + color[i] = 0xdeadbeef; hr = IWICPalette_GetColors(palette, count, color, &ret); ok(hr == S_OK, "GetColors error %#lx\n", hr); ok(ret == count, "expected %u, got %u\n", count, ret); @@ -178,6 +184,8 @@ static void test_global_gif_palette(void) ok(color[1] == 0x00040506, "expected 0x00040506, got %#x\n", color[1]); ok(color[2] == 0xff070809, "expected 0xff070809, got %#x\n", color[2]); ok(color[3] == 0xff0a0b0c, "expected 0xff0a0b0c, got %#x\n", color[3]); + for (i = 4; i < 256; i++) + ok(color[i] == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", color[i]);
IWICPalette_Release(palette); IWICBitmapFrameDecode_Release(frame); @@ -320,12 +328,13 @@ static void test_local_gif_palette(void) ok(hr == S_OK, "GetColorCount error %#lx\n", hr); ok(count == 256, "expected 256, got %u\n", count);
+ for (i = 0; i < 256; i++) + color[i] = 0xdeadbeef; hr = IWICPalette_GetColors(palette, count, color, &ret); ok(hr == S_OK, "GetColors error %#lx\n", hr); ok(ret == count, "expected %u, got %u\n", count, ret); ok(color[0] == 0xff000000, "expected 0xff000000, got %#x\n", color[0]); ok(color[1] == 0x00ffffff, "expected 0x00ffffff, got %#x\n", color[1]); - for (i = 2; i < 256; i++) ok(color[i] == 0xff000000, "expected 0xff000000, got %#x\n", color[i]); } @@ -351,6 +360,8 @@ static void test_local_gif_palette(void) ok(hr == S_OK, "GetType error %#lx\n", hr); ok(type == WICBitmapPaletteTypeCustom, "expected WICBitmapPaletteTypeCustom, got %#x\n", type);
+ for (i = 0; i < 256; i++) + color[i] = 0xdeadbeef; hr = IWICPalette_GetColors(palette, count, color, &ret); ok(hr == S_OK, "GetColors error %#lx\n", hr); ok(ret == count, "expected %u, got %u\n", count, ret); @@ -358,6 +369,8 @@ static void test_local_gif_palette(void) ok(color[1] == 0x00040506, "expected 0x00040506, got %#x\n", color[1]); ok(color[2] == 0xff070809, "expected 0xff070809, got %#x\n", color[2]); ok(color[3] == 0xff0a0b0c, "expected 0xff0a0b0c, got %#x\n", color[3]); + for (i = 4; i < 256; i++) + ok(color[i] == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", color[i]);
IWICPalette_Release(palette); IWICBitmapFrameDecode_Release(frame);