Bernhard Kölbl : windows.media.speech/tests: Remove some unreliable ref checks.

Alexandre Julliard julliard at winehq.org
Mon May 16 15:37:56 CDT 2022


Module: wine
Branch: master
Commit: 44cee36ca9b81fe897bbbbeebe5e6f10f0daf04f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=44cee36ca9b81fe897bbbbeebe5e6f10f0daf04f

Author: Bernhard Kölbl <besentv at gmail.com>
Date:   Fri May 13 14:08:04 2022 +0200

windows.media.speech/tests: Remove some unreliable ref checks.

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 | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
index 5ae3ac27d8d..827596bbfb6 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -1060,8 +1060,7 @@ static void test_SpeechRecognizer(void)
         ok(hr == E_ILLEGAL_METHOD_CALL, "IAsyncInfo_get_ErrorCode failed, hr %#lx.\n", hr);
         ok(error_code == E_ILLEGAL_METHOD_CALL, "ErrorCode was %#lx.\n", error_code);
 
-        ref = IAsyncInfo_Release(info);
-        ok(ref == 1, "Got unexpected ref %lu.\n", ref);
+        IAsyncInfo_Release(info);
 
         hr = IAsyncOperation_SpeechRecognitionCompilationResult_put_Completed(operation, NULL);
         ok(hr == E_ILLEGAL_METHOD_CALL, "Got unexpected hr %#lx.\n", hr);
@@ -1102,10 +1101,8 @@ static void test_SpeechRecognizer(void)
         ok(hr == S_OK, "IAsyncInfo_get_Status failed, hr %#lx.\n", hr);
         ok(async_status == Completed, "Status was %#x.\n", async_status);
 
-        ref = IAsyncInfo_Release(info);
-        ok(ref >= 1, "Got unexpected ref %lu.\n", ref);
-        ref = IAsyncOperation_SpeechRecognitionCompilationResult_Release(operation);
-        ok(ref >= 0, "Got unexpected ref %lu.\n", ref);
+        IAsyncInfo_Release(info);
+        IAsyncOperation_SpeechRecognitionCompilationResult_Release(operation);
 
         ref = ISpeechRecognizer_Release(recognizer);
         ok(ref == 1, "Got unexpected ref %lu.\n", ref);
@@ -1153,12 +1150,10 @@ static void test_SpeechRecognizer(void)
         CloseHandle(compilation_handler.event_block);
         CloseHandle(compilation_handler.event_finished);
 
-        ref = IAsyncInfo_Release(info);
-        ok(ref == 1, "Got unexpected ref %lu.\n", ref);
+        IAsyncInfo_Release(info);
 
 skip_operation:
-        ref = IAsyncOperation_SpeechRecognitionCompilationResult_Release(operation);
-        ok(!ref, "Got unexpected ref %lu.\n", ref);
+        IAsyncOperation_SpeechRecognitionCompilationResult_Release(operation);
 
         ref = ISpeechRecognizer_Release(recognizer);
         ok(ref == 1, "Got unexpected ref %lu.\n", ref);




More information about the wine-cvs mailing list