DDS file layout can been found here: https://docs.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-p...
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/windowscodecs/ddsformat.c | 81 +++++++++++++++++++++++++++- dlls/windowscodecs/tests/ddsformat.c | 4 +- 2 files changed, 81 insertions(+), 4 deletions(-)
Ziqing Hui zhui@codeweavers.com wrote:
--- a/dlls/windowscodecs/tests/ddsformat.c +++ b/dlls/windowscodecs/tests/ddsformat.c @@ -86,9 +86,9 @@ static HRESULT init_decoder(IWICBitmapDecoder *decoder, IWICStream *stream, HRES
hr = IWICBitmapDecoder_Initialize(decoder, (IStream*)stream, WICDecodeMetadataCacheOnDemand); if (index == -1) {
todo_wine ok(SUCCEEDED(hr), "Decoder Initialize failed, hr=%x\n", hr);
} else {ok(SUCCEEDED(hr), "Decoder Initialize failed, hr=%x\n", hr);
todo_wine ok(hr == expected, "%d: Expected hr=%x, got %x\n", index, expected, hr);
} return hr;ok(hr == expected, "%d: Expected hr=%x, got %x\n", index, expected, hr);
}
Please avoid using SUCCEEDED() in the tests, it's a very bad style. SUCCEEDED() macro may hide the bugs and in most cases is meaningless. Always explicitly test for S_OK instead.
Signed-off-by: Vincent Povirk vincent@codeweavers.com
I think checking SUCCEEDED is OK in this case because we have an exact check later. The first one just determines whether the decoder works and further tests can be run.