Nikolay Sivov : amstream/tests: Simplify refcount check.
Module: wine Branch: master Commit: b9357ecaad919a96df5a1461c9527b56718f8b42 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b9357ecaad919a96df5a1461c9... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon May 16 20:54:31 2016 +0300 amstream/tests: Simplify refcount check. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/tests/amstream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 1db88c2..c9e9392 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -29,9 +29,10 @@ #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 const WCHAR filenameW[] = {'t','e','s','t','.','a','v','i',0};
participants (1)
-
Alexandre Julliard