oledb32/tests: Simplify recount check.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-05-17 21:22:12 +03:00 committed by Alexandre Julliard
parent 11a01849e8
commit dc8f504b51
1 changed files with 4 additions and 3 deletions

View File

@ -42,9 +42,10 @@ static WCHAR initstring_default[] = {'D','a','t','a',' ','S','o','u','r','c','e'
#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 void test_GetDataSource(WCHAR *initstring)