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
0b3c158c
Commit
0b3c158c
authored
Mar 04, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
18fe3982
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
72 deletions
+71
-72
Makefile.in
dlls/sapi/tests/Makefile.in
+0
-1
automation.c
dlls/sapi/tests/automation.c
+5
-5
resource.c
dlls/sapi/tests/resource.c
+4
-4
stream.c
dlls/sapi/tests/stream.c
+4
-4
token.c
dlls/sapi/tests/token.c
+50
-50
tts.c
dlls/sapi/tests/tts.c
+8
-8
No files found.
dlls/sapi/tests/Makefile.in
View file @
0b3c158c
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
sapi.dll
IMPORTS
=
ole32 user32 advapi32
...
...
dlls/sapi/tests/automation.c
View file @
0b3c158c
...
...
@@ -36,26 +36,26 @@ static void test_interfaces(void)
hr
=
CoCreateInstance
(
&
CLSID_SpFileStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpeechFileStream
,
(
void
**
)
&
filestream
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechFileStream interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechFileStream interface: %#
l
x.
\n
"
,
hr
);
hr
=
CoCreateInstance
(
&
CLSID_SpFileStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#
l
x.
\n
"
,
hr
);
IUnknown_Release
(
unk
);
hr
=
CoCreateInstance
(
&
CLSID_SpFileStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDispatch
,
(
void
**
)
&
dispatch
);
ok
(
hr
==
S_OK
,
"Failed to create IDispatch interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create IDispatch interface: %#
l
x.
\n
"
,
hr
);
IDispatch_Release
(
dispatch
);
hr
=
CoCreateInstance
(
&
CLSID_SpFileStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpeechBaseStream
,
(
void
**
)
&
basestream
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechBaseStream interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechBaseStream interface: %#
l
x.
\n
"
,
hr
);
ISpeechBaseStream_Release
(
basestream
);
hr
=
CoCreateInstance
(
&
CLSID_SpFileStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpStream
,
(
void
**
)
&
spstrem
);
ok
(
hr
==
S_OK
,
"Failed to create ISpStream interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create ISpStream interface: %#
l
x.
\n
"
,
hr
);
ISpStream_Release
(
spstrem
);
ISpeechFileStream_Release
(
filestream
);
...
...
dlls/sapi/tests/resource.c
View file @
0b3c158c
...
...
@@ -34,26 +34,26 @@ static void test_interfaces(void)
hr
=
CoCreateInstance
(
&
CLSID_SpResourceManager
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpResourceManager
,
(
void
**
)
&
resource_manager
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechVoice interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechVoice interface: %#
l
x.
\n
"
,
hr
);
ok
(
!!
resource_manager
,
"Expected non-NULL resource manager.
\n
"
);
hr
=
CoCreateInstance
(
&
CLSID_SpResourceManager
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpResourceManager
,
(
void
**
)
&
resource_manager2
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechVoice interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechVoice interface: %#
l
x.
\n
"
,
hr
);
ok
(
!!
resource_manager2
,
"Expected non-NULL resource manager.
\n
"
);
todo_wine
ok
(
resource_manager2
==
resource_manager
,
"Expected managers to match.
\n
"
);
ISpResourceManager_Release
(
resource_manager2
);
hr
=
CoCreateInstance
(
&
CLSID_SpResourceManager
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#
l
x.
\n
"
,
hr
);
ok
(
!!
unk
,
"Expected non-NULL unk.
\n
"
);
todo_wine
ok
(
unk
==
(
IUnknown
*
)
resource_manager
,
"Expected unk to match existing manager.
\n
"
);
IUnknown_Release
(
unk
);
hr
=
CoCreateInstance
(
&
CLSID_SpResourceManager
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDispatch
,
(
void
**
)
&
dispatch
);
ok
(
hr
==
E_NOINTERFACE
,
"Succeeded to create IDispatch interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Succeeded to create IDispatch interface: %#
l
x.
\n
"
,
hr
);
ok
(
!
dispatch
,
"Expected NULL dispatch, got %p."
,
dispatch
);
ISpResourceManager_Release
(
resource_manager
);
...
...
dlls/sapi/tests/stream.c
View file @
0b3c158c
...
...
@@ -31,7 +31,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line)
ULONG
rc
;
IUnknown_AddRef
(
obj
);
rc
=
IUnknown_Release
(
obj
);
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"Unexpected refcount %
d, expected %
d.
\n
"
,
rc
,
ref
);
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"Unexpected refcount %
ld, expected %l
d.
\n
"
,
rc
,
ref
);
}
static
void
test_interfaces
(
void
)
...
...
@@ -43,19 +43,19 @@ static void test_interfaces(void)
hr
=
CoCreateInstance
(
&
CLSID_SpStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpStream
,
(
void
**
)
&
speech_stream
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechVoice interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechVoice interface: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
speech_stream
,
1
);
hr
=
CoCreateInstance
(
&
CLSID_SpStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
unk
,
1
);
EXPECT_REF
(
speech_stream
,
1
);
IUnknown_Release
(
unk
);
hr
=
CoCreateInstance
(
&
CLSID_SpStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDispatch
,
(
void
**
)
&
dispatch
);
ok
(
hr
==
E_NOINTERFACE
,
"Succeeded to create IDispatch interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Succeeded to create IDispatch interface: %#
l
x.
\n
"
,
hr
);
ok
(
!
dispatch
,
"Expected NULL dispatch, got %p."
,
dispatch
);
ISpStream_Release
(
speech_stream
);
...
...
dlls/sapi/tests/token.c
View file @
0b3c158c
...
...
@@ -35,16 +35,16 @@ static void test_data_key(void)
hr
=
CoCreateInstance
(
&
CLSID_SpDataKey
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpRegDataKey
,
(
void
**
)
&
data_key
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
res
=
RegCreateKeyExA
(
HKEY_CURRENT_USER
,
"Software
\\
Winetest
\\
sapi"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
key
,
NULL
);
ok
(
res
==
ERROR_SUCCESS
,
"got %d
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"got %
l
d
\n
"
,
res
);
hr
=
ISpRegDataKey_SetKey
(
data_key
,
key
,
FALSE
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpRegDataKey_SetKey
(
data_key
,
key
,
FALSE
);
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
ISpRegDataKey_Release
(
data_key
);
}
...
...
@@ -58,25 +58,25 @@ static void test_token_category(void)
hr
=
CoCreateInstance
(
&
CLSID_SpObjectTokenCategory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectTokenCategory
,
(
void
**
)
&
cat
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenCategory_EnumTokens
(
cat
,
NULL
,
NULL
,
&
enum_tokens
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenCategory_SetId
(
cat
,
L"bogus"
,
FALSE
);
ok
(
hr
==
SPERR_INVALID_REGISTRY_KEY
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_INVALID_REGISTRY_KEY
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenCategory_SetId
(
cat
,
SPCAT_VOICES
,
FALSE
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenCategory_SetId
(
cat
,
SPCAT_VOICES
,
FALSE
);
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenCategory_EnumTokens
(
cat
,
NULL
,
NULL
,
&
enum_tokens
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
IEnumSpObjectTokens_GetCount
(
enum_tokens
,
&
count
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
IEnumSpObjectTokens_Release
(
enum_tokens
);
ISpObjectTokenCategory_Release
(
cat
);
...
...
@@ -91,26 +91,26 @@ static void test_token_enum(void)
hr
=
CoCreateInstance
(
&
CLSID_SpObjectTokenEnum
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectTokenEnumBuilder
,
(
void
**
)
&
token_enum
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenEnumBuilder_GetCount
(
token_enum
,
&
count
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenEnumBuilder_Next
(
token_enum
,
1
,
&
token
,
&
count
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenEnumBuilder_SetAttribs
(
token_enum
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
count
=
0xdeadbeef
;
hr
=
ISpObjectTokenEnumBuilder_GetCount
(
token_enum
,
&
count
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %u
\n
"
,
count
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %
l
u
\n
"
,
count
);
count
=
0xdeadbeef
;
hr
=
ISpObjectTokenEnumBuilder_Next
(
token_enum
,
1
,
&
token
,
&
count
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %u
\n
"
,
count
);
ok
(
hr
==
S_FALSE
,
"got %08
l
x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %
l
u
\n
"
,
count
);
ISpObjectTokenEnumBuilder_Release
(
token_enum
);
}
...
...
@@ -126,21 +126,21 @@ static void test_default_token_id(void)
hr
=
CoCreateInstance
(
&
CLSID_SpObjectTokenCategory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectTokenCategory
,
(
void
**
)
&
cat
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
token_id
=
(
LPWSTR
)
0xdeadbeef
;
hr
=
ISpObjectTokenCategory_GetDefaultTokenId
(
cat
,
&
token_id
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
ok
(
token_id
==
(
LPWSTR
)
0xdeadbeef
,
"got %p
\n
"
,
token_id
);
hr
=
ISpObjectTokenCategory_GetDefaultTokenId
(
cat
,
NULL
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenCategory_SetId
(
cat
,
SPCAT_AUDIOOUT
,
FALSE
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenCategory_GetDefaultTokenId
(
cat
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %08
l
x
\n
"
,
hr
);
token_id
=
(
LPWSTR
)
0xdeadbeef
;
hr
=
ISpObjectTokenCategory_GetDefaultTokenId
(
cat
,
&
token_id
);
...
...
@@ -152,7 +152,7 @@ static void test_default_token_id(void)
return
;
}
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
token_id
!=
(
LPWSTR
)
0xdeadbeef
&&
token_id
!=
NULL
,
"got %p
\n
"
,
token_id
);
regvalue_size
=
sizeof
(
regvalue
);
...
...
@@ -163,7 +163,7 @@ static void test_default_token_id(void)
skip
(
"DefaultDefaultTokenId not found for AudioOutput category (%s)
\n
"
,
wine_dbgstr_w
(
token_id
)
);
}
else
{
ok
(
res
==
ERROR_SUCCESS
,
"got %08x
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"got %08
l
x
\n
"
,
res
);
ok
(
!
wcscmp
(
regvalue
,
token_id
),
"GetDefaultTokenId (%s) should be equal to the DefaultDefaultTokenId key (%s)
\n
"
,
wine_dbgstr_w
(
token_id
),
wine_dbgstr_w
(
regvalue
)
);
...
...
@@ -182,52 +182,52 @@ static void test_object_token(void)
hr
=
CoCreateInstance
(
&
CLSID_SpObjectToken
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectToken
,
(
void
**
)
&
token
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectToken_GetId
(
token
,
NULL
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
tempW
=
(
LPWSTR
)
0xdeadbeef
;
hr
=
ISpObjectToken_GetId
(
token
,
&
tempW
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
ok
(
tempW
==
(
LPWSTR
)
0xdeadbeef
,
"got %s
\n
"
,
wine_dbgstr_w
(
tempW
)
);
hr
=
ISpObjectToken_GetCategory
(
token
,
NULL
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
cat
=
(
LPVOID
)
0xdeadbeef
;
hr
=
ISpObjectToken_GetCategory
(
token
,
&
cat
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
ok
(
cat
==
(
LPVOID
)
0xdeadbeef
,
"got %p
\n
"
,
cat
);
hr
=
ISpObjectToken_SetId
(
token
,
NULL
,
NULL
,
FALSE
);
ok
(
hr
==
E_POINTER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectToken_SetId
(
token
,
L"bogus"
,
NULL
,
FALSE
);
ok
(
hr
==
E_POINTER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectToken_SetId
(
token
,
NULL
,
L"bogus"
,
FALSE
);
ok
(
hr
==
SPERR_NOT_FOUND
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_NOT_FOUND
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectToken_SetId
(
token
,
NULL
,
L"HKEY_LOCAL_MACHINE
\\
SOFTWARE
\\
winetest bogus"
,
FALSE
);
ok
(
hr
==
SPERR_NOT_FOUND
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_NOT_FOUND
,
"got %08
l
x
\n
"
,
hr
);
/* SetId succeeds even if the key is invalid, but exists */
hr
=
ISpObjectToken_SetId
(
token
,
NULL
,
L"HKEY_LOCAL_MACHINE
\\
SOFTWARE"
,
FALSE
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectToken_SetId
(
token
,
NULL
,
NULL
,
FALSE
);
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectToken_SetId
(
token
,
NULL
,
L"bogus"
,
FALSE
);
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectToken_GetId
(
token
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectToken_GetCategory
(
token
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %08
l
x
\n
"
,
hr
);
tempW
=
NULL
;
hr
=
ISpObjectToken_GetId
(
token
,
&
tempW
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
todo_wine
ok
(
tempW
!=
NULL
,
"got %p
\n
"
,
tempW
);
if
(
tempW
)
{
ok
(
!
wcscmp
(
tempW
,
L"HKEY_LOCAL_MACHINE
\\
SOFTWARE"
),
"got %s
\n
"
,
...
...
@@ -237,22 +237,22 @@ static void test_object_token(void)
cat
=
(
LPVOID
)
0xdeadbeef
;
hr
=
ISpObjectToken_GetCategory
(
token
,
&
cat
);
todo_wine
ok
(
hr
==
SPERR_INVALID_REGISTRY_KEY
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
SPERR_INVALID_REGISTRY_KEY
,
"got %08
l
x
\n
"
,
hr
);
ok
(
cat
==
(
LPVOID
)
0xdeadbeef
,
"got %p
\n
"
,
cat
);
/* get the default token id for SPCAT_AUDIOOUT */
hr
=
CoCreateInstance
(
&
CLSID_SpObjectTokenCategory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectTokenCategory
,
(
void
**
)
&
cat
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
hr
=
ISpObjectTokenCategory_SetId
(
cat
,
SPCAT_AUDIOOUT
,
FALSE
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
token_id
=
(
LPWSTR
)
0xdeadbeef
;
hr
=
ISpObjectTokenCategory_GetDefaultTokenId
(
cat
,
&
token_id
);
if
(
hr
==
SPERR_NOT_FOUND
)
{
skip
(
"AudioOutput category not found for GetDefaultTokenId
\n
"
);
return
;
}
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
token_id
!=
(
LPWSTR
)
0xdeadbeef
&&
token_id
!=
NULL
,
"got %p
\n
"
,
token_id
);
ISpObjectTokenCategory_Release
(
cat
);
...
...
@@ -260,15 +260,15 @@ static void test_object_token(void)
ISpObjectToken_Release
(
token
);
hr
=
CoCreateInstance
(
&
CLSID_SpObjectToken
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectToken
,
(
void
**
)
&
token
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
/* NULL appears to auto-detect the category */
hr
=
ISpObjectToken_SetId
(
token
,
NULL
,
token_id
,
FALSE
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
tempW
=
NULL
;
hr
=
ISpObjectToken_GetId
(
token
,
&
tempW
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
todo_wine
ok
(
tempW
!=
NULL
,
"got %p
\n
"
,
tempW
);
if
(
tempW
)
{
ok
(
!
wcsncmp
(
tempW
,
token_id
,
wcslen
(
token_id
)),
...
...
@@ -278,12 +278,12 @@ static void test_object_token(void)
cat
=
(
LPVOID
)
0xdeadbeef
;
hr
=
ISpObjectToken_GetCategory
(
token
,
&
cat
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
todo_wine
ok
(
cat
!=
(
LPVOID
)
0xdeadbeef
,
"got %p
\n
"
,
cat
);
if
(
cat
!=
(
LPVOID
)
0xdeadbeef
)
{
tempW
=
NULL
;
hr
=
ISpObjectTokenCategory_GetId
(
cat
,
&
tempW
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
todo_wine
ok
(
tempW
!=
NULL
,
"got %p
\n
"
,
tempW
);
if
(
tempW
)
{
ok
(
!
wcscmp
(
tempW
,
SPCAT_AUDIOOUT
),
"got %s
\n
"
,
wine_dbgstr_w
(
tempW
)
);
...
...
dlls/sapi/tests/tts.c
View file @
0b3c158c
...
...
@@ -31,7 +31,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line)
ULONG
rc
;
IUnknown_AddRef
(
obj
);
rc
=
IUnknown_Release
(
obj
);
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"Unexpected refcount %
d, expected %
d.
\n
"
,
rc
,
ref
);
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"Unexpected refcount %
ld, expected %l
d.
\n
"
,
rc
,
ref
);
}
static
void
test_interfaces
(
void
)
...
...
@@ -45,38 +45,38 @@ static void test_interfaces(void)
hr
=
CoCreateInstance
(
&
CLSID_SpVoice
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpeechVoice
,
(
void
**
)
&
speech_voice
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechVoice interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create ISpeechVoice interface: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
speech_voice
,
1
);
hr
=
CoCreateInstance
(
&
CLSID_SpVoice
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDispatch
,
(
void
**
)
&
dispatch
);
ok
(
hr
==
S_OK
,
"Failed to create IDispatch interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create IDispatch interface: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
dispatch
,
1
);
EXPECT_REF
(
speech_voice
,
1
);
IDispatch_Release
(
dispatch
);
hr
=
CoCreateInstance
(
&
CLSID_SpVoice
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
unk
,
1
);
EXPECT_REF
(
speech_voice
,
1
);
IUnknown_Release
(
unk
);
hr
=
CoCreateInstance
(
&
CLSID_SpVoice
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpVoice
,
(
void
**
)
&
spvoice
);
ok
(
hr
==
S_OK
,
"Failed to create ISpVoice interface: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create ISpVoice interface: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
spvoice
,
1
);
EXPECT_REF
(
speech_voice
,
1
);
hr
=
ISpVoice_QueryInterface
(
spvoice
,
&
IID_ISpeechVoice
,
(
void
**
)
&
speech_voice2
);
ok
(
hr
==
S_OK
,
"ISpVoice_QueryInterface failed: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ISpVoice_QueryInterface failed: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
speech_voice2
,
2
);
EXPECT_REF
(
spvoice
,
2
);
EXPECT_REF
(
speech_voice
,
1
);
ISpeechVoice_Release
(
speech_voice2
);
hr
=
ISpeechVoice_QueryInterface
(
speech_voice
,
&
IID_ISpVoice
,
(
void
**
)
&
spvoice2
);
ok
(
hr
==
S_OK
,
"ISpeechVoice_QueryInterface failed: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ISpeechVoice_QueryInterface failed: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
speech_voice
,
2
);
EXPECT_REF
(
spvoice2
,
2
);
EXPECT_REF
(
spvoice
,
1
);
...
...
@@ -85,7 +85,7 @@ static void test_interfaces(void)
hr
=
ISpeechVoice_QueryInterface
(
speech_voice
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
container
);
ok
(
hr
==
S_OK
,
"ISpeechVoice_QueryInterface failed: %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ISpeechVoice_QueryInterface failed: %#
l
x.
\n
"
,
hr
);
EXPECT_REF
(
speech_voice
,
2
);
EXPECT_REF
(
container
,
2
);
IConnectionPointContainer_Release
(
container
);
...
...
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