[PATCH v3 0/6] MR217: windows.media.speech: ISpeechSynthesisStream stub implementation.

Rémi Bernon (@rbernon) wine at gitlab.winehq.org
Fri Jun 10 05:25:15 CDT 2022


Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/tests/speech.c:
>  
>          compilation_result = (void*)0xdeadbeef;
>          hr = IAsyncOperation_SpeechRecognitionCompilationResult_GetResults(operation, &compilation_result);
> +        if (hr == S_OK)      /* Sometimes the operation could have already finished here, */
> +            goto skip_await; /* if so skip waiting and getting the results a second time. */
> +
I'd suggest to simply remove that racy `GetResult` check, but otherwise what about changing the check to `ok(hr == E_ILLEGAL_METHOD_CALL || hr == S_OK, ...)`, and then and putting the rest in an `if (hr == E_ILLEGAL_METHOD_CALL)` block?

Gotos are more often used to skip tests after a todo_wine, so that implementing the call only require to remove the todo_wine and the goto, but for normal control flow I think ifs are better.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/217#note_1810



More information about the wine-devel mailing list