Zhiyi Zhang : dsdmo/tests: Add IMediaParamInfo tests.
Alexandre Julliard
julliard at winehq.org
Wed Jul 20 15:55:32 CDT 2022
Module: wine
Branch: master
Commit: 208a8aaa295404b143550ddcc824fccdc06b2242
URL: https://gitlab.winehq.org/wine/wine/-/commit/208a8aaa295404b143550ddcc824fccdc06b2242
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Wed Jul 20 11:35:09 2022 +0800
dsdmo/tests: Add IMediaParamInfo tests.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
dlls/dsdmo/tests/dsdmo.c | 42 ++++++++++++++++++++++++++++--------------
1 file changed, 28 insertions(+), 14 deletions(-)
diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c
index 44e4f88af8f..4947b67c751 100644
--- a/dlls/dsdmo/tests/dsdmo.c
+++ b/dlls/dsdmo/tests/dsdmo.c
@@ -24,6 +24,7 @@
#include "mmsystem.h"
#include "dmo.h"
#include "initguid.h"
+#include "medparam.h"
#include "dsound.h"
#include "uuids.h"
#include "wine/test.h"
@@ -131,28 +132,41 @@ static void test_aggregation(const GUID *clsid)
static void test_interfaces(const GUID *clsid, const GUID *iid)
{
+ static const GUID *guids[] =
+ {
+ &IID_IMediaObject,
+ &IID_IMediaObjectInPlace,
+ &IID_IMediaParamInfo,
+ };
IUnknown *unk, *unk2, *unk3;
+ unsigned int i;
HRESULT hr;
ULONG ref;
hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, iid, (void **)&unk);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
- hr = IUnknown_QueryInterface(unk, &IID_IMediaObject, (void **)&unk2);
- ok(hr == S_OK, "Got hr %#lx.\n", hr);
- 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);
+ for (i = 0; i < ARRAY_SIZE(guids); ++i)
+ {
+ winetest_push_context("GUID %s", debugstr_guid(guids[i]));
- hr = IUnknown_QueryInterface(unk, &IID_IMediaObjectInPlace, (void **)&unk2);
- ok(hr == S_OK, "Got hr %#lx.\n", hr);
- 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);
+ hr = IUnknown_QueryInterface(unk, guids[i], (void **)&unk2);
+ todo_wine_if(guids[i] == &IID_IMediaParamInfo)
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ if (hr != S_OK)
+ {
+ winetest_pop_context();
+ 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);
ok(!ref, "Got outstanding refcount %ld.\n", ref);
More information about the wine-cvs
mailing list