[PATCH 6/8] mmdevapi: Add test showing that collection doesnt keep a ref on parent
Maarten Lankhorst
m.b.lankhorst at gmail.com
Mon Dec 14 11:16:40 CST 2009
---
dlls/mmdevapi/tests/mmdevenum.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c
index cff72a0..9e8e55c 100644
--- a/dlls/mmdevapi/tests/mmdevenum.c
+++ b/dlls/mmdevapi/tests/mmdevenum.c
@@ -41,6 +41,11 @@ static void test_collection(IMMDeviceEnumerator *mme, IMMDeviceCollection *col)
UINT numdev;
IMMDevice *dev;
+ /* collection doesn't keep a ref on parent */
+ IUnknown_AddRef(mme);
+ ref = IUnknown_Release(mme);
+ ok(ref == 2, "Reference count on parent is %u\n", ref);
+
ref = IUnknown_AddRef(col);
IUnknown_Release(col);
ok(ref == 2, "Invalid reference count %u on collection\n", ref);
--
1.6.5.7
--------------030604080705050305050106--
More information about the wine-patches
mailing list