Michael Stefaniuc : dmime/tests: Add refcount test for generated dmusic/ dsound.

Alexandre Julliard julliard at winehq.org
Thu May 11 15:07:28 CDT 2017


Module: wine
Branch: master
Commit: 195280bee3f090b4b09458cd0e7ab476c8d8ba1a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=195280bee3f090b4b09458cd0e7ab476c8d8ba1a

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Thu May 11 11:05:44 2017 +0200

dmime/tests: Add refcount test for generated dmusic/dsound.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard 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);




More information about the wine-cvs mailing list