msxml3/tests: Simplify refcount checks.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a3e3dfcef2
commit
11a01849e8
|
@ -43,9 +43,10 @@
|
|||
#define EXPECT_REF(node,ref) _expect_ref((IUnknown*)node, ref, __LINE__)
|
||||
static void _expect_ref(IUnknown* obj, ULONG ref, int line)
|
||||
{
|
||||
ULONG rc = IUnknown_AddRef(obj);
|
||||
IUnknown_Release(obj);
|
||||
ok_(__FILE__,line)(rc-1 == ref, "expected refcount %d, got %d\n", ref, rc-1);
|
||||
ULONG rc;
|
||||
IUnknown_AddRef(obj);
|
||||
rc = IUnknown_Release(obj);
|
||||
ok_(__FILE__, line)(rc == ref, "expected refcount %d, got %d\n", ref, rc);
|
||||
}
|
||||
|
||||
DEFINE_GUID(SID_SContainerDispatch, 0xb722be00, 0x4e68, 0x101b, 0xa2, 0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
|
||||
|
|
|
@ -43,9 +43,10 @@ static const WCHAR emptyW[] = {0};
|
|||
#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
|
||||
static void _expect_ref(IUnknown* obj, ULONG ref, int line)
|
||||
{
|
||||
ULONG rc = IUnknown_AddRef(obj);
|
||||
IUnknown_Release(obj);
|
||||
ok_(__FILE__,line)(rc-1 == ref, "expected refcount %d, got %d\n", ref, rc-1);
|
||||
ULONG rc;
|
||||
IUnknown_AddRef(obj);
|
||||
rc = IUnknown_Release(obj);
|
||||
ok_(__FILE__, line)(rc == ref, "expected refcount %d, got %d\n", ref, rc);
|
||||
}
|
||||
|
||||
static LONG get_refcount(void *iface)
|
||||
|
|
Loading…
Reference in New Issue