Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b36871b8
Commit
b36871b8
authored
May 16, 2022
by
Bernhard Kölbl
Committed by
Alexandre Julliard
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.speech/tests: Test the recognizer state.
Signed-off-by:
Bernhard Kölbl
<
besentv@gmail.com
>
parent
4e88f093
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
speech.c
dlls/windows.media.speech/tests/speech.c
+27
-0
No files found.
dlls/windows.media.speech/tests/speech.c
View file @
b36871b8
...
...
@@ -1619,6 +1619,7 @@ static void test_Recognition(void)
struct
iterator_hstring
iterator_hstring
;
struct
iterable_hstring
iterable_hstring
;
EventRegistrationToken
token
=
{
.
value
=
0
};
SpeechRecognizerState
recog_state
;
HSTRING
commands
[
3
],
hstr
,
tag
;
HANDLE
put_thread
;
LONG
ref
,
old_ref
;
...
...
@@ -1717,6 +1718,11 @@ static void test_Recognition(void)
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_add_ResultGenerated failed, hr %#lx.
\n
"
,
hr
);
ok
(
token
.
value
!=
0xdeadbeef
,
"Got unexpexted token: %#I64x.
\n
"
,
token
.
value
);
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Idle
,
"recog_state was %u.
\n
"
,
recog_state
);
hr
=
ISpeechRecognizer_CompileConstraintsAsync
(
recognizer
,
&
operation
);
ok
(
hr
==
S_OK
,
"ISpeechRecognizer_CompileConstraintsAsync failed, hr %#lx.
\n
"
,
hr
);
await_async_inspectable
((
IAsyncOperation_IInspectable
*
)
operation
,
...
...
@@ -1757,6 +1763,11 @@ static void test_Recognition(void)
IAsyncInfo_Release
(
info
);
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Capturing
,
"recog_state was %u.
\n
"
,
recog_state
);
/*
* TODO: Use a loopback device together with prerecorded audio files to test the recognizer's functionality.
*/
...
...
@@ -1767,9 +1778,20 @@ static void test_Recognition(void)
check_async_info
((
IInspectable
*
)
action2
,
3
,
Completed
,
S_OK
);
IAsyncAction_Release
(
action2
);
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Paused
||
/* Broken on Win10 1507 */
broken
(
recog_state
==
SpeechRecognizerState_Capturing
)
,
"recog_state was %u.
\n
"
,
recog_state
);
hr
=
ISpeechContinuousRecognitionSession_Resume
(
session
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_Resume failed, hr %#lx.
\n
"
,
hr
);
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Capturing
,
"recog_state was %u.
\n
"
,
recog_state
);
hr
=
ISpeechContinuousRecognitionSession_StopAsync
(
session
,
&
action2
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_StopAsync failed, hr %#lx.
\n
"
,
hr
);
...
...
@@ -1817,6 +1839,11 @@ static void test_Recognition(void)
IAsyncAction_Release
(
action2
);
IAsyncAction_Release
(
action
);
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Idle
,
"recog_state was %u.
\n
"
,
recog_state
);
hr
=
ISpeechContinuousRecognitionSession_remove_ResultGenerated
(
session
,
token
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_remove_ResultGenerated failed, hr %#lx.
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment