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
56accc25
Commit
56accc25
authored
Mar 10, 2022
by
Bernhard Kölbl
Committed by
Alexandre Julliard
Mar 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.speech/tests: Compile with long types.
Signed-off-by:
Bernhard Kölbl
<
besentv@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0f5f8f98
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
47 deletions
+46
-47
Makefile.in
dlls/windows.media.speech/tests/Makefile.in
+0
-1
speech.c
dlls/windows.media.speech/tests/speech.c
+46
-46
No files found.
dlls/windows.media.speech/tests/Makefile.in
View file @
56accc25
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
windows.media.speech.dll
IMPORTS
=
combase uuid
...
...
dlls/windows.media.speech/tests/speech.c
View file @
56accc25
...
...
@@ -48,7 +48,7 @@ static inline LONG get_ref(IUnknown *obj)
static
inline
void
check_refcount_
(
unsigned
int
line
,
void
*
obj
,
LONG
exp
)
{
LONG
ref
=
get_ref
(
obj
);
ok_
(
__FILE__
,
line
)(
exp
==
ref
,
"Unexpected refcount %
u, expected %
u
\n
"
,
ref
,
exp
);
ok_
(
__FILE__
,
line
)(
exp
==
ref
,
"Unexpected refcount %
lu, expected %l
u
\n
"
,
ref
,
exp
);
}
#define check_interface(obj, iid, exp) check_interface_(__LINE__, obj, iid, exp)
...
...
@@ -61,7 +61,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 %#
x, expected %#
x.
\n
"
,
hr
,
expected_hr
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#
lx, expected %#l
x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
...
...
@@ -79,19 +79,19 @@ static void test_ActivationFactory(void)
ULONG
ref
;
hr
=
RoInitialize
(
RO_INIT_MULTITHREADED
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#
l
x.
\n
"
,
hr
);
hr
=
WindowsCreateString
(
synthesizer_name
,
wcslen
(
synthesizer_name
),
&
str
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x.
\n
"
,
hr
);
hr
=
WindowsCreateString
(
recognizer_name
,
wcslen
(
recognizer_name
),
&
str2
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x.
\n
"
,
hr
);
hr
=
WindowsCreateString
(
garbage_name
,
wcslen
(
garbage_name
),
&
str3
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x.
\n
"
,
hr
);
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
ok
(
hr
==
S_OK
,
"RoGetActivationFactory failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"RoGetActivationFactory failed, hr %#
l
x.
\n
"
,
hr
);
check_refcount
(
factory
,
2
);
...
...
@@ -103,12 +103,12 @@ static void test_ActivationFactory(void)
check_interface
(
factory
,
&
IID_ISpeechRecognizerStatics2
,
FALSE
);
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory2
);
ok
(
hr
==
S_OK
,
"RoGetActivationFactory failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"RoGetActivationFactory failed, hr %#
l
x.
\n
"
,
hr
);
ok
(
factory
==
factory2
,
"Factories pointed at factory %p factory2 %p.
\n
"
,
factory
,
factory2
);
check_refcount
(
factory2
,
3
);
hr
=
RoGetActivationFactory
(
str2
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory3
);
todo_wine
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
/* Win10+ only */
{
...
...
@@ -121,18 +121,18 @@ static void test_ActivationFactory(void)
check_interface
(
factory3
,
&
IID_ISpeechRecognizerStatics
,
TRUE
);
hr
=
IActivationFactory_QueryInterface
(
factory3
,
&
IID_ISpeechRecognizerStatics2
,
(
void
**
)
&
recognizer_statics2
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"IActivationFactory_QueryInterface failed, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"IActivationFactory_QueryInterface failed, hr %#
l
x.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
/* ISpeechRecognizerStatics2 not available in Win10 1507 */
{
ref
=
ISpeechRecognizerStatics2_Release
(
recognizer_statics2
);
ok
(
ref
==
2
,
"Got unexpected refcount: %u.
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got unexpected refcount: %
l
u.
\n
"
,
ref
);
}
check_interface
(
factory3
,
&
IID_IInstalledVoicesStatic
,
FALSE
);
ref
=
IActivationFactory_Release
(
factory3
);
ok
(
ref
==
1
,
"Got unexpected refcount: %u.
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got unexpected refcount: %
l
u.
\n
"
,
ref
);
}
hdll
=
LoadLibraryW
(
L"windows.media.speech.dll"
);
...
...
@@ -143,18 +143,18 @@ static void test_ActivationFactory(void)
ok
(
!!
pDllGetActivationFactory
,
"DllGetActivationFactory not found.
\n
"
);
hr
=
pDllGetActivationFactory
(
str3
,
&
factory4
);
ok
((
hr
==
CLASS_E_CLASSNOTAVAILABLE
),
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
((
hr
==
CLASS_E_CLASSNOTAVAILABLE
),
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
FreeLibrary
(
hdll
);
}
hr
=
RoGetActivationFactory
(
str3
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory4
);
ok
((
hr
==
REGDB_E_CLASSNOTREG
),
"RoGetActivationFactory failed, hr %#x.
\n
"
,
hr
);
ok
((
hr
==
REGDB_E_CLASSNOTREG
),
"RoGetActivationFactory failed, hr %#
l
x.
\n
"
,
hr
);
ref
=
IActivationFactory_Release
(
factory2
);
ok
(
ref
==
2
,
"Got unexpected refcount: %u.
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got unexpected refcount: %
l
u.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
ok
(
ref
==
1
,
"Got unexpected refcount: %u.
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got unexpected refcount: %
l
u.
\n
"
,
ref
);
WindowsDeleteString
(
str
);
WindowsDeleteString
(
str2
);
...
...
@@ -183,10 +183,10 @@ static void test_SpeechSynthesizer(void)
ULONG
ref
;
hr
=
RoInitialize
(
RO_INIT_MULTITHREADED
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#
l
x
\n
"
,
hr
);
hr
=
WindowsCreateString
(
speech_synthesizer_name
,
wcslen
(
speech_synthesizer_name
),
&
str
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x
\n
"
,
hr
);
hdll
=
LoadLibraryW
(
L"windows.media.speech.dll"
);
if
(
hdll
)
...
...
@@ -195,31 +195,31 @@ static void test_SpeechSynthesizer(void)
ok
(
!!
pDllGetActivationFactory
,
"DllGetActivationFactory not found.
\n
"
);
hr
=
WindowsCreateString
(
unknown_class_name
,
wcslen
(
unknown_class_name
),
&
str2
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x
\n
"
,
hr
);
hr
=
pDllGetActivationFactory
(
str2
,
&
factory
);
ok
(
hr
==
CLASS_E_CLASSNOTAVAILABLE
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
CLASS_E_CLASSNOTAVAILABLE
,
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
WindowsDeleteString
(
str2
);
hr
=
WindowsCreateString
(
speech_synthesizer_name2
,
wcslen
(
speech_synthesizer_name2
),
&
str2
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x
\n
"
,
hr
);
hr
=
pDllGetActivationFactory
(
str2
,
&
factory2
);
ok
(
hr
==
CLASS_E_CLASSNOTAVAILABLE
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
CLASS_E_CLASSNOTAVAILABLE
,
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
WindowsDeleteString
(
str2
);
hr
=
pDllGetActivationFactory
(
str
,
&
factory2
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
}
else
{
win_skip
(
"Failed to load library, err %u.
\n
"
,
GetLastError
());
win_skip
(
"Failed to load library, err %
l
u.
\n
"
,
GetLastError
());
}
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
ok
(
hr
==
S_OK
,
"RoGetActivationFactory failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"RoGetActivationFactory failed, hr %#
l
x
\n
"
,
hr
);
if
(
hdll
)
{
...
...
@@ -229,47 +229,47 @@ static void test_SpeechSynthesizer(void)
}
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IInspectable
,
(
void
**
)
&
inspectable
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IInspectable failed, hr %#
l
x
\n
"
,
hr
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IAgileObject
,
(
void
**
)
&
agile_object
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#
l
x
\n
"
,
hr
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IInstalledVoicesStatic
,
(
void
**
)
&
voices_static
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#
l
x
\n
"
,
hr
);
hr
=
IInstalledVoicesStatic_QueryInterface
(
voices_static
,
&
IID_IInspectable
,
(
void
**
)
&
tmp_inspectable
);
ok
(
hr
==
S_OK
,
"IInstalledVoicesStatic_QueryInterface IID_IInspectable failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IInstalledVoicesStatic_QueryInterface IID_IInspectable failed, hr %#
l
x
\n
"
,
hr
);
ok
(
tmp_inspectable
==
inspectable
,
"IInstalledVoicesStatic_QueryInterface IID_IInspectable returned %p, expected %p
\n
"
,
tmp_inspectable
,
inspectable
);
IInspectable_Release
(
tmp_inspectable
);
hr
=
IInstalledVoicesStatic_QueryInterface
(
voices_static
,
&
IID_IAgileObject
,
(
void
**
)
&
tmp_agile_object
);
ok
(
hr
==
S_OK
,
"IInstalledVoicesStatic_QueryInterface IID_IAgileObject failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IInstalledVoicesStatic_QueryInterface IID_IAgileObject failed, hr %#
l
x
\n
"
,
hr
);
ok
(
tmp_agile_object
==
agile_object
,
"IInstalledVoicesStatic_QueryInterface IID_IAgileObject returned %p, expected %p
\n
"
,
tmp_agile_object
,
agile_object
);
IAgileObject_Release
(
tmp_agile_object
);
hr
=
IInstalledVoicesStatic_get_AllVoices
(
voices_static
,
&
voices
);
ok
(
hr
==
S_OK
,
"IInstalledVoicesStatic_get_AllVoices failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IInstalledVoicesStatic_get_AllVoices failed, hr %#
l
x
\n
"
,
hr
);
hr
=
IVectorView_VoiceInformation_QueryInterface
(
voices
,
&
IID_IInspectable
,
(
void
**
)
&
tmp_inspectable
);
ok
(
hr
==
S_OK
,
"IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_VoiceInformation_QueryInterface voices failed, hr %#
l
x
\n
"
,
hr
);
ok
(
tmp_inspectable
!=
inspectable
,
"IVectorView_VoiceInformation_QueryInterface voices returned %p, expected %p
\n
"
,
tmp_inspectable
,
inspectable
);
IInspectable_Release
(
tmp_inspectable
);
hr
=
IVectorView_VoiceInformation_QueryInterface
(
voices
,
&
IID_IAgileObject
,
(
void
**
)
&
tmp_agile_object
);
ok
(
hr
==
E_NOINTERFACE
,
"IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"IVectorView_VoiceInformation_QueryInterface voices failed, hr %#
l
x
\n
"
,
hr
);
size
=
0xdeadbeef
;
hr
=
IVectorView_VoiceInformation_get_Size
(
voices
,
&
size
);
ok
(
hr
==
S_OK
,
"IVectorView_VoiceInformation_get_Size voices failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_VoiceInformation_get_Size voices failed, hr %#
l
x
\n
"
,
hr
);
todo_wine
ok
(
size
!=
0
&&
size
!=
0xdeadbeef
,
"IVectorView_VoiceInformation_get_Size returned %u
\n
"
,
size
);
voice
=
(
IVoiceInformation
*
)
0xdeadbeef
;
hr
=
IVectorView_VoiceInformation_GetAt
(
voices
,
size
,
&
voice
);
ok
(
hr
==
E_BOUNDS
,
"IVectorView_VoiceInformation_GetAt failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
E_BOUNDS
,
"IVectorView_VoiceInformation_GetAt failed, hr %#
l
x
\n
"
,
hr
);
ok
(
voice
==
NULL
,
"IVectorView_VoiceInformation_GetAt returned %p
\n
"
,
voice
);
hr
=
IVectorView_VoiceInformation_GetMany
(
voices
,
size
,
1
,
&
voice
,
&
size
);
ok
(
hr
==
S_OK
,
"IVectorView_VoiceInformation_GetMany failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_VoiceInformation_GetMany failed, hr %#
l
x
\n
"
,
hr
);
ok
(
size
==
0
,
"IVectorView_VoiceInformation_GetMany returned count %u
\n
"
,
size
);
IVectorView_VoiceInformation_Release
(
voices
);
...
...
@@ -280,25 +280,25 @@ static void test_SpeechSynthesizer(void)
IInspectable_Release
(
inspectable
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_ISpeechSynthesizer
,
(
void
**
)
&
synthesizer
);
ok
(
hr
==
E_NOINTERFACE
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
hr
=
RoActivateInstance
(
str
,
&
inspectable
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
hr
=
IInspectable_QueryInterface
(
inspectable
,
&
IID_ISpeechSynthesizer
,
(
void
**
)
&
synthesizer
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
hr
=
IInspectable_QueryInterface
(
inspectable
,
&
IID_IClosable
,
(
void
**
)
&
closable
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#
l
x.
\n
"
,
hr
);
ref
=
IClosable_Release
(
closable
);
ok
(
ref
==
2
,
"Got unexpected ref %u.
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got unexpected ref %
l
u.
\n
"
,
ref
);
ref
=
ISpeechSynthesizer_Release
(
synthesizer
);
ok
(
ref
==
1
,
"Got unexpected ref %u.
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got unexpected ref %
l
u.
\n
"
,
ref
);
ref
=
IInspectable_Release
(
inspectable
);
ok
(
!
ref
,
"Got unexpected ref %u.
\n
"
,
ref
);
ok
(
!
ref
,
"Got unexpected ref %
l
u.
\n
"
,
ref
);
IActivationFactory_Release
(
factory
);
WindowsDeleteString
(
str
);
...
...
@@ -315,13 +315,13 @@ static void test_VoiceInformation(void)
HRESULT
hr
;
hr
=
RoInitialize
(
RO_INIT_MULTITHREADED
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#
l
x
\n
"
,
hr
);
hr
=
WindowsCreateString
(
voice_information_name
,
wcslen
(
voice_information_name
),
&
str
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x
\n
"
,
hr
);
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
ok
(
hr
==
REGDB_E_CLASSNOTREG
,
"RoGetActivationFactory returned unexpected hr %#x
\n
"
,
hr
);
ok
(
hr
==
REGDB_E_CLASSNOTREG
,
"RoGetActivationFactory returned unexpected hr %#
l
x
\n
"
,
hr
);
WindowsDeleteString
(
str
);
...
...
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