From f69619791d38ba2737a91256a0ba6ed42c0a8f66 Mon Sep 17 00:00:00 2001 From: Ziqing Hui Date: Tue, 16 Jun 2020 13:54:07 +0800 Subject: [PATCH] windowscodecs/tests: Add decoder info tests for DDS decoder. Signed-off-by: Ziqing Hui Signed-off-by: Esme Povirk Signed-off-by: Alexandre Julliard --- dlls/windowscodecs/tests/info.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c index af2532efb4e..707b0715b7c 100644 --- a/dlls/windowscodecs/tests/info.c +++ b/dlls/windowscodecs/tests/info.c @@ -105,6 +105,11 @@ static void test_decoder_info(void) ".tiff,.tif", 1 }, + { + &CLSID_WICDdsDecoder, + "image/vnd.ms-dds", + ".dds", + } }; IWICBitmapDecoderInfo *decoder_info, *decoder_info2; IWICComponentInfo *info; @@ -124,6 +129,10 @@ static void test_decoder_info(void) WCHAR mimetypeW[64]; hr = CoCreateInstance(test->clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IWICBitmapDecoder, (void **)&decoder); + if (test->clsid == &CLSID_WICDdsDecoder && hr != S_OK) { + win_skip("DDS decoder is not supported\n"); + continue; + } ok(SUCCEEDED(hr), "Failed to create decoder, hr %#x.\n", hr); decoder_info = NULL; @@ -184,6 +193,7 @@ static void test_decoder_info(void) hr = IWICBitmapDecoderInfo_GetMimeTypes(decoder_info, len, value, &len); ok(hr == S_OK, "GetMimeType failed, hr=%x\n", hr); todo_wine_if(test->todo) { + todo_wine_if(i == 6) ok(lstrcmpW(value, mimetypeW) == 0, "GetMimeType returned wrong value %s\n", wine_dbgstr_w(value)); ok(len == lstrlenW(mimetypeW) + 1, "GetMimeType returned wrong len %i\n", len); } @@ -195,6 +205,7 @@ static void test_decoder_info(void) hr = IWICBitmapDecoderInfo_GetMimeTypes(decoder_info, 256, value, &len); ok(hr == S_OK, "GetMimeType failed, hr=%x\n", hr); todo_wine_if(test->todo) { + todo_wine_if(i == 6) ok(lstrcmpW(value, mimetypeW) == 0, "GetMimeType returned wrong value %s\n", wine_dbgstr_w(value)); ok(len == lstrlenW(mimetypeW) + 1, "GetMimeType returned wrong len %i\n", len); }