Commit 0ade62e0 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dswave/tests: Test some IPersistStream methods of DirectSoundWave.

parent 32699d6f
...@@ -86,6 +86,37 @@ static void test_COM(void) ...@@ -86,6 +86,37 @@ static void test_COM(void)
while (IDirectMusicObject_Release(dmo)); while (IDirectMusicObject_Release(dmo));
} }
static void test_dswave(void)
{
IDirectMusicObject *dmo;
IPersistStream *ps;
CLSID class = { 0 };
ULARGE_INTEGER size;
HRESULT hr;
hr = CoCreateInstance(&CLSID_DirectSoundWave, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmo);
ok(hr == S_OK, "DirectSoundWave create failed: %08x, expected S_OK\n", hr);
/* IPersistStream */
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
todo_wine ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
todo_wine ok(IsEqualGUID(&class, &CLSID_DirectSoundWave),
"Expected class CLSID_DirectSoundWave got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps);
todo_wine ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
while (IDirectMusicObject_Release(dmo));
}
START_TEST(dswave) START_TEST(dswave)
{ {
CoInitialize(NULL); CoInitialize(NULL);
...@@ -97,6 +128,7 @@ START_TEST(dswave) ...@@ -97,6 +128,7 @@ START_TEST(dswave)
return; return;
} }
test_COM(); test_COM();
test_dswave();
CoUninitialize(); CoUninitialize();
} }
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