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
86fb17c8
Commit
86fb17c8
authored
Jan 03, 2023
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 starting, stopping, pausing and resuming the recognition session.
Signed-off-by:
Bernhard Kölbl
<
besentv@gmail.com
>
parent
b36871b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
speech.c
dlls/windows.media.speech/tests/speech.c
+23
-1
No files found.
dlls/windows.media.speech/tests/speech.c
View file @
86fb17c8
...
...
@@ -18,6 +18,7 @@
#define COBJMACROS
#include <stdarg.h>
#include "corerror.h"
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
...
...
@@ -1741,6 +1742,11 @@ static void test_Recognition(void)
await_async_void
(
action
,
&
action_handler
);
action2
=
(
void
*
)
0xdeadbeef
;
hr
=
ISpeechContinuousRecognitionSession_StartAsync
(
session
,
&
action2
);
todo_wine
ok
(
hr
==
COR_E_INVALIDOPERATION
,
"ISpeechContinuousRecognitionSession_StartAsync failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
action2
==
NULL
,
"action2 was %p.
\n
"
,
action2
);
hr
=
IAsyncAction_QueryInterface
(
action
,
&
IID_IAsyncInfo
,
(
void
**
)
&
info
);
ok
(
hr
==
S_OK
,
"IAsyncAction_QueryInterface failed, hr %#lx.
\n
"
,
hr
);
check_async_info
((
IInspectable
*
)
action
,
1
,
Completed
,
S_OK
);
...
...
@@ -1784,6 +1790,17 @@ static void test_Recognition(void)
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Paused
||
/* Broken on Win10 1507 */
broken
(
recog_state
==
SpeechRecognizerState_Capturing
)
,
"recog_state was %u.
\n
"
,
recog_state
);
/* Check what happens if we try to pause again, when the session is already paused. */
hr
=
ISpeechContinuousRecognitionSession_PauseAsync
(
session
,
&
action2
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_PauseAsync failed, hr %#lx.
\n
"
,
hr
);
await_async_void
(
action2
,
&
action_handler
);
check_async_info
((
IInspectable
*
)
action2
,
4
,
Completed
,
S_OK
);
IAsyncAction_Release
(
action2
);
hr
=
ISpeechContinuousRecognitionSession_Resume
(
session
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_Resume failed, hr %#lx.
\n
"
,
hr
);
/* Resume when already resumed. */
hr
=
ISpeechContinuousRecognitionSession_Resume
(
session
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_Resume failed, hr %#lx.
\n
"
,
hr
);
...
...
@@ -1823,7 +1840,7 @@ static void test_Recognition(void)
hr
=
IAsyncInfo_Close
(
info
);
/* If IAsyncInfo_Close would wait for the handler to finish, the test would get stuck here. */
ok
(
hr
==
S_OK
,
"IAsyncInfo_Close failed, hr %#lx.
\n
"
,
hr
);
check_async_info
((
IInspectable
*
)
action2
,
4
,
AsyncStatus_Closed
,
S_OK
);
check_async_info
((
IInspectable
*
)
action2
,
5
,
AsyncStatus_Closed
,
S_OK
);
set
=
SetEvent
(
action_handler
.
event_block
);
ok
(
set
==
TRUE
,
"Event 'event_block' wasn't set.
\n
"
);
...
...
@@ -1844,6 +1861,11 @@ static void test_Recognition(void)
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
);
/* Try stopping, when already stopped. */
hr
=
ISpeechContinuousRecognitionSession_StopAsync
(
session
,
&
action
);
todo_wine
ok
(
hr
==
COR_E_INVALIDOPERATION
,
"ISpeechContinuousRecognitionSession_StopAsync failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
action
==
NULL
,
"action was %p.
\n
"
,
action
);
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