From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/windowscodecs/tests/converter.c | 7 +------ dlls/windowscodecs/tests/metadata.c | 16 +++------------ dlls/windowscodecs/tests/tiffformat.c | 28 --------------------------- 3 files changed, 4 insertions(+), 47 deletions(-)
diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index fd617a1feb7..f6cef841d56 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -962,16 +962,11 @@ static void load_stream(IUnknown *reader, IStream *stream) { HRESULT hr; IWICPersistStream *persist; -#ifdef WORDS_BIGENDIAN - DWORD persist_options = WICPersistOptionBigEndian; -#else - DWORD persist_options = WICPersistOptionLittleEndian; -#endif
hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); ok(hr == S_OK, "QueryInterface failed, hr=%lx\n", hr);
- hr = IWICPersistStream_LoadEx(persist, stream, NULL, persist_options); + hr = IWICPersistStream_LoadEx(persist, stream, NULL, 0); ok(hr == S_OK, "LoadEx failed, hr=%lx\n", hr);
IWICPersistStream_Release(persist); diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 3bc7f87c8ee..83fb5b64877 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1177,11 +1177,6 @@ static void test_metadata_IFD(void) UINT count; GUID format; char *IFD_data_swapped; -#ifdef WORDS_BIGENDIAN - DWORD persist_options = WICPersistOptionBigEndian; -#else - DWORD persist_options = WICPersistOptionLittleEndian; -#endif
hr = CoCreateInstance(&CLSID_WICIfdMetadataReader, NULL, CLSCTX_INPROC_SERVER, &IID_IWICMetadataReader, (void**)&reader); @@ -1201,7 +1196,7 @@ static void test_metadata_IFD(void) ok(hr == S_OK, "GetCount error %#lx\n", hr); ok(count == 0, "unexpected count %u\n", count);
- load_stream(reader, (const char *)&IFD_data, sizeof(IFD_data), persist_options); + load_stream(reader, (const char *)&IFD_data, sizeof(IFD_data), WICPersistOptionLittleEndian);
test_reader_container_format(reader, &GUID_ContainerFormatTiff);
@@ -1211,16 +1206,11 @@ static void test_metadata_IFD(void)
compare_metadata(reader, td, count);
- /* test IFD data with different endianness */ - if (persist_options == WICPersistOptionLittleEndian) - persist_options = WICPersistOptionBigEndian; - else - persist_options = WICPersistOptionLittleEndian; - + /* Test big-endian IFD data */ IFD_data_swapped = HeapAlloc(GetProcessHeap(), 0, sizeof(IFD_data)); memcpy(IFD_data_swapped, &IFD_data, sizeof(IFD_data)); byte_swap_ifd_data(IFD_data_swapped); - load_stream(reader, IFD_data_swapped, sizeof(IFD_data), persist_options); + load_stream(reader, IFD_data_swapped, sizeof(IFD_data), WICPersistOptionBigEndian); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#lx\n", hr); ok(count == ARRAY_SIZE(td), "unexpected count %u\n", count); diff --git a/dlls/windowscodecs/tests/tiffformat.c b/dlls/windowscodecs/tests/tiffformat.c index 86365fb7b92..9fb2ab6216c 100644 --- a/dlls/windowscodecs/tests/tiffformat.c +++ b/dlls/windowscodecs/tests/tiffformat.c @@ -75,11 +75,7 @@ static const struct tiff_1bpp_data BYTE pixel_data[4]; } tiff_1bpp_data = { -#ifdef WORDS_BIGENDIAN - 'M' | 'M' << 8, -#else 'I' | 'I' << 8, -#endif 42, FIELD_OFFSET(struct tiff_1bpp_data, number_of_entries), 13, @@ -115,11 +111,7 @@ static const struct tiff_8bpp_alpha BYTE pixel_data[8]; } tiff_8bpp_alpha = { -#ifdef WORDS_BIGENDIAN - 'M' | 'M' << 8, -#else 'I' | 'I' << 8, -#endif 42, FIELD_OFFSET(struct tiff_8bpp_alpha, number_of_entries), 15, @@ -158,11 +150,7 @@ static const struct tiff_8bpp_data BYTE pixel_data[4]; } tiff_8bpp_data = { -#ifdef WORDS_BIGENDIAN - 'M' | 'M' << 8, -#else 'I' | 'I' << 8, -#endif 42, FIELD_OFFSET(struct tiff_8bpp_data, number_of_entries), 14, @@ -234,11 +222,7 @@ static struct tiff_resolution_image_data BYTE pixel_data[4]; } tiff_resolution_image_data = { -#ifdef WORDS_BIGENDIAN - 'M' | 'M' << 8, -#else 'I' | 'I' << 8, -#endif 42, FIELD_OFFSET(struct tiff_resolution_image_data, number_of_entries), 13, @@ -275,11 +259,7 @@ static const struct tiff_24bpp_data BYTE pixel_data[3]; } tiff_24bpp_data = { -#ifdef WORDS_BIGENDIAN - 'M' | 'M' << 8, -#else 'I' | 'I' << 8, -#endif 42, FIELD_OFFSET(struct tiff_1bpp_data, number_of_entries), 13, @@ -315,11 +295,7 @@ static const struct tiff_4bps_bgra BYTE pixel_data[4]; } tiff_4bps_bgra = { -#ifdef WORDS_BIGENDIAN - 'M' | 'M' << 8, -#else 'I' | 'I' << 8, -#endif 42, FIELD_OFFSET(struct tiff_4bps_bgra, number_of_entries), 14, @@ -853,11 +829,7 @@ static const struct tiff_1x1_data BYTE pixel_data[32]; } tiff_1x1_data = { -#ifdef WORDS_BIGENDIAN - 'M' | 'M' << 8, -#else 'I' | 'I' << 8, -#endif 42, FIELD_OFFSET(struct tiff_1x1_data, number_of_entries), 13,