[PATCH 2/2] windowscodecs: Implement DdsDecoder_Initialize().
Dmitry Timoshkov
dmitry at baikal.ru
Thu Apr 16 05:54:32 CDT 2020
Ziqing Hui <zhui at 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);
> + ok(SUCCEEDED(hr), "Decoder Initialize failed, hr=%x\n", hr);
> } else {
> - todo_wine ok(hr == expected, "%d: Expected hr=%x, got %x\n", index, expected, hr);
> + ok(hr == expected, "%d: Expected hr=%x, got %x\n", index, expected, hr);
> }
> return 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.
--
Dmitry.
More information about the wine-devel
mailing list