[PATCH 1/7] dmime/tests: Add refcount test for generated dmusic/dsound
Michael Stefaniuc
mstefani at winehq.org
Thu May 11 04:05:44 CDT 2017
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/dmime/tests/performance.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/dmime/tests/performance.c b/dlls/dmime/tests/performance.c
index 730ec52..9187c81 100644
--- a/dlls/dmime/tests/performance.c
+++ b/dlls/dmime/tests/performance.c
@@ -122,6 +122,18 @@ static HRESULT test_InitAudio(void)
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
destroy_performance(performance, NULL, NULL);
+ /* Refcounts for auto generated dmusic and dsound */
+ create_performance(&performance, NULL, NULL, FALSE);
+ dmusic = NULL;
+ dsound = NULL;
+ hr = IDirectMusicPerformance8_InitAudio(performance, &dmusic, &dsound, NULL, 0, 64, 0, NULL);
+ ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
+ ref = get_refcount(dsound);
+ todo_wine ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
+ ref = get_refcount(dmusic);
+ ok(ref == 2, "dmusic ref count got %d expected 2\n", ref);
+ destroy_performance(performance, NULL, NULL);
+
/* dsound without SetCooperativeLevel() */
create_performance(&performance, NULL, &dsound, FALSE);
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, &dsound, NULL, 0, 0, 0, NULL);
--
2.9.3
More information about the wine-patches
mailing list