mmdevapi: Add test showing collection doesn't keep ref on parent.

This commit is contained in:
Maarten Lankhorst 2009-12-14 18:16:40 +01:00 committed by Alexandre Julliard
parent 5e9ec19217
commit f10d56088e
1 changed files with 5 additions and 0 deletions

View File

@ -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);