[PATCH v4 0/9] MR217: windows.media.speech: ISpeechSynthesisStream stub implementation.
Rémi Bernon (@rbernon)
wine at gitlab.winehq.org
Mon Jun 13 14:23:39 CDT 2022
Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/tests/speech.c:
> + {
> + check_interface(ss_stream, &IID_ISpeechSynthesisStream, TRUE);
> + check_interface(ss_stream, &IID_IAgileObject, TRUE);
> +
> + ref = ISpeechSynthesisStream_Release(ss_stream);
> + ok(ref == 0, "Got unexpected ref %lu.\n", ref);
> + }
> +
> + IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
> +
> + operation_ss_stream = (void *)0xdeadbeef;
> + hr = ISpeechSynthesizer_SynthesizeSsmlToStreamAsync(synthesizer, NULL, &operation_ss_stream);
> + /* Broken on Win 8 + 8.1 */
> + todo_wine ok(hr == S_OK || broken(hr == E_INVALIDARG), "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr);
> + todo_wine ok(!!operation_ss_stream || broken(operation_ss_stream == NULL), "operation_ss_stream had value %p.\n", operation_ss_stream);
> + if (hr == S_OK) IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
I think it'd be better with only the `hr` check marked as broken, and putting the second check inside a `if (hr == S_OK) ... else ...`. Otherwise with the two `broken` you can very well have `hr == S_OK` and `operation_ss_stream == NULL` passing the checks.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/217#note_1974
More information about the wine-devel
mailing list