Commit 309a564d authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dxdiagn/tests: Enable compilation with long types.

parent 261bf491
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dxdiagn.dll
IMPORTS = oleaut32 ole32
......
......@@ -34,7 +34,7 @@ static void test_Initialize(void)
&IID_IDxDiagProvider, (LPVOID*)&pddp);
ok(hr == S_OK ||
broken(hr == REGDB_E_CLASSNOTREG), /* Clean W2K3 */
"Creating a IDxDiagProvider instance failed with %x\n", hr);
"Creating a IDxDiagProvider instance failed with %lx\n", hr);
if (FAILED(hr))
{
skip("Failed to create a IDxDiagProvider instance\n");
......@@ -44,18 +44,18 @@ static void test_Initialize(void)
/* Test passing a NULL DXDIAG_INIT_PARAMS pointer. */
hr = IDxDiagProvider_Initialize(pddp, NULL);
ok(hr == E_POINTER,
"Expected IDxDiagProvider::Initialize to return E_POINTER, got %x\n", hr);
"Expected IDxDiagProvider::Initialize to return E_POINTER, got %lx\n", hr);
/* Test passing invalid dwSize values. */
params.dwSize = 0;
hr = IDxDiagProvider_Initialize(pddp, &params);
ok(hr == E_INVALIDARG,
"Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr);
"Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
params.dwSize = sizeof(params) + 1;
hr = IDxDiagProvider_Initialize(pddp, &params);
ok(hr == E_INVALIDARG,
"Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr);
"Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
/* Test passing an unexpected dwDxDiagHeaderVersion value. */
params.dwSize = sizeof(params);
......@@ -64,7 +64,7 @@ static void test_Initialize(void)
params.pReserved = NULL;
hr = IDxDiagProvider_Initialize(pddp, &params);
ok(hr == E_INVALIDARG,
"Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr);
"Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %lx\n", hr);
/* Setting pReserved to a non-NULL value causes a crash on Windows. */
if (0)
......@@ -73,7 +73,7 @@ static void test_Initialize(void)
params.bAllowWHQLChecks = FALSE;
params.pReserved = (VOID*)0xdeadbeef;
hr = IDxDiagProvider_Initialize(pddp, &params);
trace("IDxDiagProvider::Initialize returned %x\n", hr);
trace("IDxDiagProvider::Initialize returned %lx\n", hr);
}
/* Test passing an appropriately initialized DXDIAG_INIT_PARAMS. */
......@@ -81,11 +81,11 @@ static void test_Initialize(void)
params.bAllowWHQLChecks = FALSE;
params.pReserved = NULL;
hr = IDxDiagProvider_Initialize(pddp, &params);
ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr);
/* Test initializing multiple times. */
hr = IDxDiagProvider_Initialize(pddp, &params);
ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr);
IDxDiagProvider_Release(pddp);
}
......@@ -101,7 +101,7 @@ static void test_GetRootContainer(void)
&IID_IDxDiagProvider, (LPVOID*)&pddp);
ok(hr == S_OK ||
broken(hr == REGDB_E_CLASSNOTREG), /* Clean W2K3 */
"Creating a IDxDiagProvider instance failed with %x\n", hr);
"Creating a IDxDiagProvider instance failed with %lx\n", hr);
if (FAILED(hr))
{
skip("Failed to create a IDxDiagProvider instance\n");
......@@ -111,18 +111,18 @@ static void test_GetRootContainer(void)
/* Test calling IDxDiagProvider::GetRootContainer before initialization. */
hr = IDxDiagProvider_GetRootContainer(pddp, NULL);
ok(hr == CO_E_NOTINITIALIZED,
"Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %x\n", hr);
"Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %lx\n", hr);
hr = IDxDiagProvider_GetRootContainer(pddp, &pddc);
ok(hr == CO_E_NOTINITIALIZED,
"Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %x\n", hr);
"Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %lx\n", hr);
params.dwSize = sizeof(params);
params.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION;
params.bAllowWHQLChecks = FALSE;
params.pReserved = NULL;
hr = IDxDiagProvider_Initialize(pddp, &params);
ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected IDxDiagProvider::Initialize to return S_OK, got %lx\n", hr);
if (FAILED(hr))
{
skip("IDxDiagProvider::Initialize failed\n");
......@@ -134,16 +134,16 @@ static void test_GetRootContainer(void)
if (0)
{
hr = IDxDiagProvider_GetRootContainer(pddp, NULL);
trace("IDxDiagProvider::GetRootContainer returned %x\n", hr);
trace("IDxDiagProvider::GetRootContainer returned %lx\n", hr);
}
hr = IDxDiagProvider_GetRootContainer(pddp, &pddc);
ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %lx\n", hr);
/* IDxDiagProvider::GetRootContainer creates new instances of the root
* container rather than maintain a static root container. */
hr = IDxDiagProvider_GetRootContainer(pddp, &pddc2);
ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected IDxDiagProvider::GetRootContainer to return S_OK, got %lx\n", hr);
ok(pddc != pddc2, "Expected the two pointers (%p vs. %p) to be unequal\n", pddc, pddc2);
IDxDiagContainer_Release(pddc2);
......
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