Ziqing Hui : windowscodecs/tests: Add decoder info tests for DDS decoder.

Alexandre Julliard julliard at winehq.org
Wed Jun 17 15:54:00 CDT 2020


Module: wine
Branch: master
Commit: f69619791d38ba2737a91256a0ba6ed42c0a8f66
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f69619791d38ba2737a91256a0ba6ed42c0a8f66

Author: Ziqing Hui <zhui at codeweavers.com>
Date:   Tue Jun 16 13:54:07 2020 +0800

windowscodecs/tests: Add decoder info tests for DDS decoder.

Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
Signed-off-by: Esme Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 af2532efb4..707b0715b7 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);
     }




More information about the wine-cvs mailing list