From 3115e4901709c6ff9a49fb4bb591c31532e0a1a1 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 26 May 2014 23:08:34 +0200 Subject: [PATCH] dmusic/tests: Test unimplemented IPersistStream methods in DMCollection. --- dlls/dmusic/tests/dmusic.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c index 528d182d974..b28a187f95a 100644 --- a/dlls/dmusic/tests/dmusic.c +++ b/dlls/dmusic/tests/dmusic.c @@ -314,7 +314,10 @@ static void test_dmcoll(void) { IDirectMusicCollection *dmc; IDirectMusicObject *dmo; + IPersistStream *ps; DMUS_OBJECTDESC desc; + CLSID class; + ULARGE_INTEGER size; HRESULT hr; hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER, @@ -347,6 +350,18 @@ static void test_dmcoll(void) ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection), "guidClass changed, should be CLSID_DirectMusicCollection\n"); + /* Unimplemented IPersistStream methods*/ + hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IPersistStream, (void**)&ps); + ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr); + hr = IPersistStream_GetClassID(ps, &class); + ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %08x\n", hr); + hr = IPersistStream_IsDirty(ps); + 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 (IDirectMusicCollection_Release(dmc)); }