Bernhard Kölbl : windows.media.speech/tests: Add a test for IAsyncOperation_get_Completed.
Alexandre Julliard
julliard at winehq.org
Mon May 16 15:37:56 CDT 2022
Module: wine
Branch: master
Commit: 0636cf580868ce870b4024e78766bf83fabe9dda
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0636cf580868ce870b4024e78766bf83fabe9dda
Author: Bernhard Kölbl <besentv at gmail.com>
Date: Wed Apr 27 19:12:46 2022 +0200
windows.media.speech/tests: Add a test for IAsyncOperation_get_Completed.
This one actually retrieves a handler.
Signed-off-by: Bernhard Kölbl <besentv at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/windows.media.speech/tests/speech.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
index 827596bbfb6..33da6828dc2 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -860,7 +860,7 @@ static void test_SpeechRecognizer(void)
HANDLE put_thread;
HRESULT hr, error_code;
UINT32 id;
- LONG ref;
+ LONG ref, old_ref;
hr = RoInitialize(RO_INIT_MULTITHREADED);
ok(hr == S_OK, "RoInitialize failed, hr %#lx.\n", hr);
@@ -1137,6 +1137,16 @@ static void test_SpeechRecognizer(void)
todo_wine ok(compilation_handler.ref == 3, "Got unexpected ref %lu.\n", compilation_handler.ref);
todo_wine check_refcount(operation, 3);
+ handler = (void*)0xdeadbeef;
+ old_ref = compilation_handler.ref;
+ hr = IAsyncOperation_SpeechRecognitionCompilationResult_get_Completed(operation, &handler);
+ ok(hr == S_OK, "IAsyncOperation_SpeechRecognitionCompilationResult_get_Completed failed, hr %#lx.\n", hr);
+ todo_wine ok(handler == &compilation_handler.IAsyncHandler_Compilation_iface, "Handler was %p.\n", handler);
+
+ ref = compilation_handler.ref - old_ref;
+ todo_wine ok(ref == 1, "The ref was increased by %lu.\n", ref);
+ if (handler) IAsyncOperationCompletedHandler_SpeechRecognitionCompilationResult_Release(handler);
+
hr = IAsyncOperation_SpeechRecognitionCompilationResult_QueryInterface(operation, &IID_IAsyncInfo, (void **)&info);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
More information about the wine-cvs
mailing list