Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b2b0e7ee
Commit
b2b0e7ee
authored
Aug 23, 2022
by
Bernhard Kölbl
Committed by
Alexandre Julliard
Aug 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.speech/tests: Add basic query tests for SpeechSynthesizerOptions.
parent
958b3da9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
speech.c
dlls/windows.media.speech/tests/speech.c
+20
-3
No files found.
dlls/windows.media.speech/tests/speech.c
View file @
b2b0e7ee
...
...
@@ -73,8 +73,9 @@ static inline void check_refcount_(unsigned int line, void *obj, LONG exp)
ok_
(
__FILE__
,
line
)(
exp
==
ref
,
"Unexpected refcount %lu, expected %lu
\n
"
,
ref
,
exp
);
}
#define check_interface(obj, iid, exp) check_interface_(__LINE__, obj, iid, exp)
static
void
check_interface_
(
unsigned
int
line
,
void
*
obj
,
const
IID
*
iid
,
BOOL
supported
)
#define check_interface(obj, iid, exp) check_interface_(__LINE__, obj, iid, exp, FALSE)
#define check_optional_interface(obj, iid, exp) check_interface_(__LINE__, obj, iid, exp, TRUE)
static
void
check_interface_
(
unsigned
int
line
,
void
*
obj
,
const
IID
*
iid
,
BOOL
supported
,
BOOL
optional
)
{
IUnknown
*
iface
=
obj
;
HRESULT
hr
,
expected_hr
;
...
...
@@ -83,7 +84,7 @@ static void check_interface_(unsigned int line, void *obj, const IID *iid, BOOL
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#lx, expected %#lx.
\n
"
,
hr
,
expected_hr
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
||
broken
(
hr
==
E_NOINTERFACE
&&
optional
)
,
"Got hr %#lx, expected %#lx.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
...
...
@@ -1017,11 +1018,27 @@ static void test_SpeechSynthesizer(void)
hr
=
IInspectable_QueryInterface
(
inspectable
,
&
IID_IClosable
,
(
void
**
)
&
closable
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Test ISpeechSynthesizer2 iface */
hr
=
IInspectable_QueryInterface
(
inspectable
,
&
IID_ISpeechSynthesizer2
,
(
void
**
)
&
synthesizer2
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Requires Win10 >= 1703 */
if
(
hr
==
S_OK
)
{
ISpeechSynthesizerOptions
*
options
;
hr
=
ISpeechSynthesizer2_get_Options
(
synthesizer2
,
&
options
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
check_interface
(
options
,
&
IID_IAgileObject
,
TRUE
);
check_optional_interface
(
options
,
&
IID_ISpeechSynthesizerOptions2
,
TRUE
);
/* Requires Win10 >= 1709 */
check_optional_interface
(
options
,
&
IID_ISpeechSynthesizerOptions3
,
TRUE
);
/* Requires Win10 >= 1803 */
ref
=
ISpeechSynthesizerOptions_Release
(
options
);
ok
(
ref
==
1
,
"Got unexpected ref %lu.
\n
"
,
ref
);
}
ref
=
ISpeechSynthesizer2_Release
(
synthesizer2
);
ok
(
ref
==
3
,
"Got unexpected ref %lu.
\n
"
,
ref
);
}
...
...
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