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