Paul Vriens : mmdevapi/tests: Fix a test failure on Vista+ with no soundcard present.
Alexandre Julliard
julliard at winehq.org
Thu Dec 24 10:27:19 CST 2009
Module: wine
Branch: master
Commit: 20a50f30c4ab57330436438ee42bbc5b491623fd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=20a50f30c4ab57330436438ee42bbc5b491623fd
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Thu Dec 24 13:12:36 2009 +0100
mmdevapi/tests: Fix a test failure on Vista+ with no soundcard present.
---
dlls/mmdevapi/tests/dependency.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/mmdevapi/tests/dependency.c b/dlls/mmdevapi/tests/dependency.c
index 1568bed..0d60cb2 100644
--- a/dlls/mmdevapi/tests/dependency.c
+++ b/dlls/mmdevapi/tests/dependency.c
@@ -55,15 +55,18 @@ START_TEST(dependency)
if (FAILED(hr))
{
skip("mmdevapi not available: 0x%08x\n", hr);
- return;
+ goto cleanup;
}
hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(mme, eRender, eMultimedia, &dev);
- ok(hr == S_OK, "GetDefaultAudioEndpoint failed: 0x%08x\n", hr);
+ ok(hr == S_OK || hr == E_NOTFOUND, "GetDefaultAudioEndpoint failed: 0x%08x\n", hr);
if (hr != S_OK)
{
- skip("GetDefaultAudioEndpoint returns 0x%08x, skipping tests\n", hr);
- return;
+ if (hr == E_NOTFOUND)
+ skip("No sound card available\n");
+ else
+ skip("GetDefaultAudioEndpoint returns 0x%08x\n", hr);
+ goto cleanup;
}
ok(!GetModuleHandle("dsound.dll"), "dsound.dll was already loaded!\n");
@@ -94,8 +97,14 @@ START_TEST(dependency)
ok(IsEqualCLSID(&clsid, &CLSID_DSoundRender), "Wrong class id %s", dump_guid(&clsid));
}
}
+
+cleanup:
if (bf)
IUnknown_Release(bf);
+ if (dev)
+ IUnknown_Release(dev);
+ if (mme)
+ IUnknown_Release(mme);
- IUnknown_Release(mme);
+ CoUninitialize();
}
More information about the wine-cvs
mailing list