From: Eric Pouech epouech@codeweavers.com
Signed-off-by: Eric Pouech epouech@codeweavers.com --- dlls/windows.media.speech/tests/speech.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c index 9096c69cafc..358e214dc26 100644 --- a/dlls/windows.media.speech/tests/speech.c +++ b/dlls/windows.media.speech/tests/speech.c @@ -857,7 +857,7 @@ static void test_SpeechSynthesizer(void) IVectorView_VoiceInformation *voices = NULL; IInstalledVoicesStatic *voices_static = NULL; ISpeechSynthesisStream *ss_stream = NULL; - IVoiceInformation *voice; + IVoiceInformation *voice, *voice2; IInspectable *inspectable = NULL, *tmp_inspectable = NULL; IAgileObject *agile_object = NULL, *tmp_agile_object = NULL; ISpeechSynthesizer *synthesizer; @@ -953,6 +953,17 @@ static void test_SpeechSynthesizer(void) ok(hr == S_OK, "IVectorView_VoiceInformation_get_Size voices failed, hr %#lx\n", hr); todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_VoiceInformation_get_Size returned %u\n", size);
+ voice = (IVoiceInformation *)0xdeadbeef; + hr = IVectorView_VoiceInformation_GetAt(voices, 0, &voice); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = IVectorView_VoiceInformation_GetAt(voices, 0, &voice2); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(voice == voice2, "Didn't get the same object\n"); + ref = IVoiceInformation_Release(voice); + ok(ref == 2, "Unexpected ref count %ld\n", ref); + ref = IVoiceInformation_Release(voice2); + ok(ref == 1, "Unexpected ref count %ld\n", ref); + voice = (IVoiceInformation *)0xdeadbeef; hr = IVectorView_VoiceInformation_GetAt(voices, size, &voice); ok(hr == E_BOUNDS, "IVectorView_VoiceInformation_GetAt failed, hr %#lx\n", hr); @@ -962,6 +973,13 @@ static void test_SpeechSynthesizer(void) ok(hr == S_OK, "IVectorView_VoiceInformation_GetMany failed, hr %#lx\n", hr); ok(size == 0, "IVectorView_VoiceInformation_GetMany returned count %u\n", size);
+ hr = IVectorView_VoiceInformation_GetMany(voices, 0, 1, &voice, &size); + ok(hr == S_OK, "IVectorView_VoiceInformation_GetMany failed, hr %#lx\n", hr); + ok(size == 1, "IVectorView_VoiceInformation_GetMany returned count %u\n", size); + ok(voice == voice2, "Didn't get the same object\n"); + ref = IVoiceInformation_Release(voice); + ok(ref == 1, "Unexpected ref count %ld\n", ref); + hr = IInstalledVoicesStatic_get_DefaultVoice(voices_static, &voice); todo_wine ok(hr == S_OK, "IInstalledVoicesStatic_get_DefaultVoice failed, hr %#lx\n", hr);