Module: wine Branch: master Commit: b971c55a3a180d77132cbfe4156de4928ce447c4 URL: https://gitlab.winehq.org/wine/wine/-/commit/b971c55a3a180d77132cbfe4156de49...
Author: Rémi Bernon rbernon@codeweavers.com Date: Wed Oct 25 14:19:31 2023 +0200
dmime/tests: Avoid checking message segment state reference count.
---
dlls/dmime/tests/dmime.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index 151dbead3c1..7ed6568ecd4 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -38,8 +38,8 @@ static ULONG get_refcount(void *iface) return IUnknown_Release(unknown); }
-#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c) -static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported) +#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c, FALSE) +static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported, BOOL check_refs) { ULONG expect_ref = get_refcount(iface_ptr); IUnknown *iface = iface_ptr; @@ -52,10 +52,10 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO if (SUCCEEDED(hr)) { LONG ref = get_refcount(unk); - ok_(__FILE__, line)(ref == expect_ref + 1, "got %ld\n", ref); + if (check_refs) ok_(__FILE__, line)(ref == expect_ref + 1, "got %ld\n", ref); IUnknown_Release(unk); ref = get_refcount(iface_ptr); - ok_(__FILE__, line)(ref == expect_ref, "got %ld\n", ref); + if (check_refs) ok_(__FILE__, line)(ref == expect_ref, "got %ld\n", ref); } }
@@ -3024,8 +3024,8 @@ static void check_dmus_notification_pmsg_(int line, DMUS_NOTIFICATION_PMSG *msg, ok_(__FILE__, line)(!msg->punkUser, "got punkUser %p\n", msg->punkUser); else { - check_interface_(line, msg->punkUser, &IID_IDirectMusicSegmentState, TRUE); - check_interface_(line, msg->punkUser, &IID_IDirectMusicSegmentState8, TRUE); + check_interface_(line, msg->punkUser, &IID_IDirectMusicSegmentState, TRUE, FALSE); + check_interface_(line, msg->punkUser, &IID_IDirectMusicSegmentState8, TRUE, FALSE); } }