Commit 0b3c158c authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

sapi/tests: Enable compilation with long types.

parent 18fe3982
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = sapi.dll
IMPORTS = ole32 user32 advapi32
......
......@@ -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: %#lx.\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: %#lx.\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: %#lx.\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: %#lx.\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: %#lx.\n", hr);
ISpStream_Release(spstrem);
ISpeechFileStream_Release(filestream);
......
......@@ -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: %#lx.\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: %#lx.\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: %#lx.\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: %#lx.\n", hr);
ok(!dispatch, "Expected NULL dispatch, got %p.", dispatch);
ISpResourceManager_Release(resource_manager);
......
......@@ -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 %ld.\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: %#lx.\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: %#lx.\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: %#lx.\n", hr);
ok(!dispatch, "Expected NULL dispatch, got %p.", dispatch);
ISpStream_Release(speech_stream);
......
......@@ -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 %ld.\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: %#lx.\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: %#lx.\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: %#lx.\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: %#lx.\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: %#lx.\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: %#lx.\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: %#lx.\n", hr);
EXPECT_REF(speech_voice, 2);
EXPECT_REF(container, 2);
IConnectionPointContainer_Release(container);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment