R��mi Bernon (@rbernon) commented about dlls/windows.media.speech/tests/speech.c:
ok(ref == 2, "Got unexpected ref %lu.\n", ref);
}
hr = ISpeechSynthesizerOptions_QueryInterface(options, &IID_ISpeechSynthesizerOptions3, (void **)&options3);
ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got unexpected hr %#lx.\n", hr); /* Requires Win10 >= 1803 */
if (hr == S_OK)
{
ref = ISpeechSynthesizerOptions3_Release(options3);
ok(ref == 2, "Got unexpected ref %lu.\n", ref);
}
ref = ISpeechSynthesizerOptions_Release(options);
ok(ref == 1, "Got unexpected ref %lu.\n", ref);
}
I'm not sure the refcount checks are really useful. Maybe you could use `check_interface`, with a new `optional` parameter, accepting `broken(hr == E_NOINTERFACE && optional)`.