[PATCH 3/3] Fix a test failure on Vista+ with no soundcard present
Paul Vriens
Paul.Vriens.Wine at gmail.com
Thu Dec 24 06:12:36 CST 2009
---
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();
}
--
1.6.2.5
--------------020904050703010508050808--
More information about the wine-patches
mailing list