shell32/tests: Move test after return

Alexandre Julliard julliard at winehq.org
Tue Sep 27 21:54:29 CDT 2016


André Hentschel <nerv at dawncrow.de> writes:

> diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
> index 1591b7b..1f5dc33 100644
> --- a/dlls/shell32/tests/shlfolder.c
> +++ b/dlls/shell32/tests/shlfolder.c
> @@ -1588,11 +1588,11 @@ static void test_FolderShortcut(void) {
>      if (hr != S_OK) return;
>  
>      hr = IShellFolder_GetDisplayNameOf(pShellFolder, NULL, SHGDN_FORPARSING, &strret);
> -    ok(hr == S_OK, "IShellFolder_GetDisplayNameOf(NULL) failed! hr = %08x\n", hr);
>      if (hr != S_OK) {
>          IShellFolder_Release(pShellFolder);
>          return;
>      }
> +    ok(hr == S_OK, "IShellFolder_GetDisplayNameOf(NULL) failed! hr = %08x\n", hr);

It would be better to check for the expected error instead of disabling
the test.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list