Commit 208a8aaa authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

dsdmo/tests: Add IMediaParamInfo tests.

parent 4e23e412
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "mmsystem.h" #include "mmsystem.h"
#include "dmo.h" #include "dmo.h"
#include "initguid.h" #include "initguid.h"
#include "medparam.h"
#include "dsound.h" #include "dsound.h"
#include "uuids.h" #include "uuids.h"
#include "wine/test.h" #include "wine/test.h"
...@@ -131,28 +132,41 @@ static void test_aggregation(const GUID *clsid) ...@@ -131,28 +132,41 @@ static void test_aggregation(const GUID *clsid)
static void test_interfaces(const GUID *clsid, const GUID *iid) static void test_interfaces(const GUID *clsid, const GUID *iid)
{ {
static const GUID *guids[] =
{
&IID_IMediaObject,
&IID_IMediaObjectInPlace,
&IID_IMediaParamInfo,
};
IUnknown *unk, *unk2, *unk3; IUnknown *unk, *unk2, *unk3;
unsigned int i;
HRESULT hr; HRESULT hr;
ULONG ref; ULONG ref;
hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, iid, (void **)&unk); hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, iid, (void **)&unk);
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IMediaObject, (void **)&unk2); for (i = 0; i < ARRAY_SIZE(guids); ++i)
ok(hr == S_OK, "Got hr %#lx.\n", hr); {
hr = IUnknown_QueryInterface(unk2, iid, (void **)&unk3); winetest_push_context("GUID %s", debugstr_guid(guids[i]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(unk3 == unk, "Interface pointers didn't match.\n");
IUnknown_Release(unk3);
IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IMediaObjectInPlace, (void **)&unk2); hr = IUnknown_QueryInterface(unk, guids[i], (void **)&unk2);
ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine_if(guids[i] == &IID_IMediaParamInfo)
hr = IUnknown_QueryInterface(unk2, iid, (void **)&unk3); ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK)
ok(unk3 == unk, "Interface pointers didn't match.\n"); {
IUnknown_Release(unk3); winetest_pop_context();
IUnknown_Release(unk2); continue;
}
hr = IUnknown_QueryInterface(unk2, iid, (void **)&unk3);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(unk3 == unk, "Interface pointers didn't match.\n");
IUnknown_Release(unk3);
IUnknown_Release(unk2);
winetest_pop_context();
}
ref = IUnknown_Release(unk); ref = IUnknown_Release(unk);
ok(!ref, "Got outstanding refcount %ld.\n", ref); ok(!ref, "Got outstanding refcount %ld.\n", ref);
......
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