Commit 5a0f4836 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ddrawex/tests: Build without -DWINE_NO_LONG_TYPES.

parent 2df68bd4
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = ddrawex.dll
IMPORTS = user32 gdi32
......
......@@ -32,9 +32,8 @@ static IDirectDraw *createDDraw(void)
HRESULT hr;
IDirectDraw *dd;
hr = IDirectDrawFactory_CreateDirectDraw(factory, NULL, NULL, DDSCL_NORMAL, 0,
0, &dd);
ok(hr == DD_OK, "Failed to create an IDirectDraw interface, hr = 0x%08x\n", hr);
hr = IDirectDrawFactory_CreateDirectDraw(factory, NULL, NULL, DDSCL_NORMAL, 0, 0, &dd);
ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr);
return SUCCEEDED(hr) ? dd : NULL;
}
......@@ -54,7 +53,7 @@ static void RefCountTest(void)
ULONG ref;
ref = get_ref((IUnknown *) dd1);
ok(ref == 1, "A new ddraw object's refcount is %u, expected 1\n", ref);
ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw_AddRef(dd1);
ref = get_ref((IUnknown *) dd1);
......@@ -64,18 +63,18 @@ static void RefCountTest(void)
IDirectDraw_Release(dd1);
return;
}
ok(ref == 2, "After AddRef the refcount is %u, expected 2\n", ref);
ok(ref == 2, "Unexpected refcount %lu.\n", ref);
IDirectDraw_Release(dd1);
ref = get_ref((IUnknown *) dd1);
ok(ref == 1, "After Release the refcount is %u, expected 1\n", ref);
ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw2, (void **) &dd2);
ref = get_ref((IUnknown *) dd2);
ok(ref == 2, "IDirectDraw2 refcount is %u, expected 2\n", ref);
ok(ref == 2, "Unexpected refcount %lu.\n", ref);
IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **) &dd3);
ref = get_ref((IUnknown *) dd3);
ok(ref == 3, "IDirectDraw3 refcount is %u, expected 3\n", ref);
ok(ref == 3, "Unexpected refcount %lu.\n", ref);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw4, (void **) &dd4);
if (FAILED(hr))
......@@ -87,14 +86,14 @@ static void RefCountTest(void)
return;
}
ref = get_ref((IUnknown *) dd4);
ok(ref == 4, "IDirectDraw4 refcount is %u, expected 4\n", ref);
ok(ref == 4, "Unexpected refcount %lu.\n", ref);
IDirectDraw_Release(dd1);
IDirectDraw2_Release(dd2);
IDirectDraw3_Release(dd3);
ref = get_ref((IUnknown *) dd4);
ok(ref == 1, "IDirectDraw4 refcount is %u, expected 1\n", ref);
ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw4_Release(dd4);
}
......@@ -128,6 +127,6 @@ START_TEST(ddrawex)
}
if(classfactory) {
ref = IClassFactory_Release(classfactory);
todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %u\n", ref);
todo_wine ok(ref == 1, "Unexpected refcount %lu.\n", ref);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment