[PATCH 13/22] dlls/atl/tests: enable compilation with long types
Eric Pouech
eric.pouech at gmail.com
Wed Feb 23 02:11:23 CST 2022
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
dlls/atl/tests/Makefile.in | 2 +-
dlls/atl/tests/atl_ax.c | 14 +++++++-------
dlls/atl/tests/module.c | 28 ++++++++++++++--------------
dlls/atl/tests/registrar.c | 26 +++++++++++++-------------
4 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/dlls/atl/tests/Makefile.in b/dlls/atl/tests/Makefile.in
index 11af85f23a2..aee6cfd92d8 100644
--- a/dlls/atl/tests/Makefile.in
+++ b/dlls/atl/tests/Makefile.in
@@ -1,6 +1,6 @@
TESTDLL = atl.dll
IMPORTS = uuid atl oleaut32 ole32 rpcrt4 user32 gdi32 advapi32
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_ATL_VER=_ATL_VER_30
+EXTRADEFS = -D_ATL_VER=_ATL_VER_30
C_SRCS = \
atl_ax.c \
diff --git a/dlls/atl/tests/atl_ax.c b/dlls/atl/tests/atl_ax.c
index 94db3640ee3..26e4ea5a54d 100644
--- a/dlls/atl/tests/atl_ax.c
+++ b/dlls/atl/tests/atl_ax.c
@@ -73,20 +73,20 @@ static void test_AtlAxAttachControl(void)
IUnknown *pObj, *pContainer;
hr = pAtlAxAttachControl(NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
pContainer = (IUnknown *)0xdeadbeef;
hr = pAtlAxAttachControl(NULL, NULL, &pContainer);
- ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
ok(pContainer == (IUnknown *)0xdeadbeef,
"Expected the output container pointer to be untouched, got %p\n", pContainer);
hr = pAtlAxAttachControl(NULL, hwnd, NULL);
- ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08lx\n", hr);
hr = CoCreateInstance(&CLSID_WebBrowser, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,
&IID_IOleObject, (void **)&pObj);
- ok(hr == S_OK, "Expected CoCreateInstance to return S_OK, got 0x%08x\n", hr);
+ ok(hr == S_OK, "Expected CoCreateInstance to return S_OK, got 0x%08lx\n", hr);
if (FAILED(hr))
{
@@ -95,16 +95,16 @@ static void test_AtlAxAttachControl(void)
}
hr = pAtlAxAttachControl(pObj, NULL, NULL);
- ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08lx\n", hr);
pContainer = NULL;
hr = pAtlAxAttachControl(pObj, NULL, &pContainer);
- ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08lx\n", hr);
ok(pContainer != NULL, "got %p\n", pContainer);
IUnknown_Release(pContainer);
hr = pAtlAxAttachControl(pObj, hwnd, NULL);
- ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08x\n", hr);
+ ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08lx\n", hr);
IUnknown_Release(pObj);
diff --git a/dlls/atl/tests/module.c b/dlls/atl/tests/module.c
index db8bd28742f..8bb8a533c1a 100644
--- a/dlls/atl/tests/module.c
+++ b/dlls/atl/tests/module.c
@@ -70,29 +70,29 @@ static void test_winmodule(void)
winmod.m_pCreateWndList = (void*)0xdeadbeef;
winmod.m_csWindowCreate.LockCount = 0xdeadbeef;
hres = AtlModuleInit(&winmod, NULL, NULL);
- ok(hres == S_OK, "AtlModuleInit failed: %08x\n", hres);
+ ok(hres == S_OK, "AtlModuleInit failed: %08lx\n", hres);
ok(!winmod.m_pCreateWndList, "winmod.m_pCreateWndList = %p\n", winmod.m_pCreateWndList);
- ok(winmod.m_csWindowCreate.LockCount == -1, "winmod.m_csWindowCreate.LockCount = %d\n",
+ ok(winmod.m_csWindowCreate.LockCount == -1, "winmod.m_csWindowCreate.LockCount = %ld\n",
winmod.m_csWindowCreate.LockCount);
AtlModuleAddCreateWndData(&winmod, create_data, (void*)0xdead0001);
ok(winmod.m_pCreateWndList == create_data, "winmod.m_pCreateWndList != create_data\n");
ok(create_data[0].m_pThis == (void*)0xdead0001, "unexpected create_data[0].m_pThis %p\n", create_data[0].m_pThis);
- ok(create_data[0].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[0].m_dwThreadID %x\n",
+ ok(create_data[0].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[0].m_dwThreadID %lx\n",
create_data[0].m_dwThreadID);
ok(!create_data[0].m_pNext, "unexpected create_data[0].m_pNext %p\n", create_data[0].m_pNext);
AtlModuleAddCreateWndData(&winmod, create_data+1, (void*)0xdead0002);
ok(winmod.m_pCreateWndList == create_data+1, "winmod.m_pCreateWndList != create_data\n");
ok(create_data[1].m_pThis == (void*)0xdead0002, "unexpected create_data[1].m_pThis %p\n", create_data[1].m_pThis);
- ok(create_data[1].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[1].m_dwThreadID %x\n",
+ ok(create_data[1].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[1].m_dwThreadID %lx\n",
create_data[1].m_dwThreadID);
ok(create_data[1].m_pNext == create_data, "unexpected create_data[1].m_pNext %p\n", create_data[1].m_pNext);
AtlModuleAddCreateWndData(&winmod, create_data+2, (void*)0xdead0003);
ok(winmod.m_pCreateWndList == create_data+2, "winmod.m_pCreateWndList != create_data\n");
ok(create_data[2].m_pThis == (void*)0xdead0003, "unexpected create_data[2].m_pThis %p\n", create_data[2].m_pThis);
- ok(create_data[2].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[2].m_dwThreadID %x\n",
+ ok(create_data[2].m_dwThreadID == GetCurrentThreadId(), "unexpected create_data[2].m_dwThreadID %lx\n",
create_data[2].m_dwThreadID);
ok(create_data[2].m_pNext == create_data+1, "unexpected create_data[2].m_pNext %p\n", create_data[2].m_pNext);
@@ -149,7 +149,7 @@ static void test_winclassinfo(void)
winmod.cbSize = sizeof(winmod);
winmod.m_pCreateWndList = (void*)0xdeadbeef;
hres = AtlModuleInit(&winmod, NULL, NULL);
- ok(hres == S_OK, "AtlModuleInit failed: %08x\n", hres);
+ ok(hres == S_OK, "AtlModuleInit failed: %08lx\n", hres);
ok(!winmod.m_pCreateWndList, "winmod.m_pCreateWndList = %p\n", winmod.m_pCreateWndList);
atom = AtlModuleRegisterWndClassInfoW(&winmod, &wci, &wndProc);
@@ -181,28 +181,28 @@ static void test_term(void)
test.cbSize = sizeof(_ATL_MODULEW);
hres = AtlModuleInit(&test, NULL, NULL);
- ok (hres == S_OK, "AtlModuleInit failed (0x%x).\n", hres);
+ ok (hres == S_OK, "AtlModuleInit failed (0x%lx).\n", hres);
hres = AtlModuleAddTermFunc(&test, term_callback, ex);
- ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%x).\n", hres);
+ ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%lx).\n", hres);
cb_val = 0xdeadbeef;
hres = AtlModuleTerm(&test);
- ok (hres == S_OK, "AtlModuleTerm failed (0x%x).\n", hres);
- ok (cb_val == ex, "wrong callback value (0x%lx).\n", cb_val);
+ ok (hres == S_OK, "AtlModuleTerm failed (0x%lx).\n", hres);
+ ok (cb_val == ex, "wrong callback value (0x%Ix).\n", cb_val);
test.cbSize = FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer);
hres = AtlModuleInit(&test, NULL, NULL);
- ok (hres == S_OK, "AtlModuleInit failed (0x%x).\n", hres);
+ ok (hres == S_OK, "AtlModuleInit failed (0x%lx).\n", hres);
hres = AtlModuleAddTermFunc(&test, term_callback, 0x23);
- ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%x).\n", hres);
+ ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%lx).\n", hres);
cb_val = 0xdeadbeef;
hres = AtlModuleTerm(&test);
- ok (hres == S_OK, "AtlModuleTerm failed (0x%x).\n", hres);
- ok (cb_val == 0xdeadbeef, "wrong callback value (0x%lx).\n", cb_val);
+ ok (hres == S_OK, "AtlModuleTerm failed (0x%lx).\n", hres);
+ ok (cb_val == 0xdeadbeef, "wrong callback value (0x%Ix).\n", cb_val);
}
START_TEST(module)
diff --git a/dlls/atl/tests/registrar.c b/dlls/atl/tests/registrar.c
index f9ec9529dd8..e332bbce0de 100644
--- a/dlls/atl/tests/registrar.c
+++ b/dlls/atl/tests/registrar.c
@@ -68,7 +68,7 @@ static void test_registrar(void)
hr = CoCreateInstance(&CLSID_Registrar, NULL, CLSCTX_INPROC_SERVER, &IID_IRegistrar, (void**)®istrar);
if (FAILED(hr))
{
- win_skip("creating IRegistrar failed, hr = 0x%08X\n", hr);
+ win_skip("creating IRegistrar failed, hr = 0x%08lX\n", hr);
return;
}
@@ -84,7 +84,7 @@ static void test_registrar(void)
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, count);
hr = IRegistrar_StringRegister(registrar, textW);
- ok(hr == S_OK, "StringRegister failed: %08x\n", hr);
+ ok(hr == S_OK, "StringRegister failed: %08lx\n", hr);
if (FAILED(hr))
{
IRegistrar_Release(registrar);
@@ -92,44 +92,44 @@ static void test_registrar(void)
}
lret = RegOpenKeyA(HKEY_CURRENT_USER, "eebf73c4-50fd-478f-bbcf-db212221227a", &key);
- ok(lret == ERROR_SUCCESS, "error %d opening registry key\n", lret);
+ ok(lret == ERROR_SUCCESS, "error %ld opening registry key\n", lret);
size = sizeof(dword);
lret = RegQueryValueExA(key, "dword_unquoted_hex", NULL, NULL, (BYTE*)&dword, &size);
- ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %d\n", lret);
+ ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %ld\n", lret);
ok(dword != 0xA, "unquoted hex is not supposed to be preserved\n");
size = sizeof(dword);
lret = RegQueryValueExA(key, "dword_quoted_hex", NULL, NULL, (BYTE*)&dword, &size);
- ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %d\n", lret);
+ ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %ld\n", lret);
ok(dword != 0xA, "quoted hex is not supposed to be preserved\n");
size = sizeof(dword);
lret = RegQueryValueExA(key, "dword_unquoted_dec", NULL, NULL, (BYTE*)&dword, &size);
- ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %d\n", lret);
- ok(dword == 1, "unquoted dec is not supposed to be %d\n", dword);
+ ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %ld\n", lret);
+ ok(dword == 1, "unquoted dec is not supposed to be %ld\n", dword);
size = sizeof(dword);
lret = RegQueryValueExA(key, "dword_quoted_dec", NULL, NULL, (BYTE*)&dword, &size);
- ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %d\n", lret);
- ok(dword == 1, "quoted dec is not supposed to be %d\n", dword);
+ ok(lret == ERROR_SUCCESS, "RegQueryValueExA failed, error %ld\n", lret);
+ ok(dword == 1, "quoted dec is not supposed to be %ld\n", dword);
size = 4;
lret = RegQueryValueExA(key, "binary_quoted", NULL, NULL, bytes, &size);
- ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %d\n", lret);
+ ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %ld\n", lret);
ok(bytes[0] == 0xde && bytes[1] == 0xad && bytes[2] == 0xbe && bytes[3] == 0xef,
"binary quoted value was not preserved (it's 0x%02X%02X%02X%02X)\n",
0xff & bytes[0], 0xff & bytes[1], 0xff & bytes[2], 0xff & bytes[3]);
size = 4;
lret = RegQueryValueExA(key, "binary_unquoted", NULL, NULL, bytes, &size);
- ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %d\n", lret);
+ ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %ld\n", lret);
ok(bytes[0] == 0xde && bytes[1] == 0xad && bytes[2] == 0x01 && bytes[3] == 0x23,
"binary unquoted value was not preserved (it's 0x%02X%02X%02X%02X)\n",
0xff & bytes[0], 0xff & bytes[1], 0xff & bytes[2], 0xff & bytes[3]);
hr = IRegistrar_StringUnregister(registrar, textW);
- ok(SUCCEEDED(hr), "IRegistrar_StringUnregister failed, hr = 0x%08X\n", hr);
+ ok(SUCCEEDED(hr), "IRegistrar_StringUnregister failed, hr = 0x%08lX\n", hr);
RegCloseKey(key);
HeapFree(GetProcessHeap(), 0, textW);
@@ -148,7 +148,7 @@ static void test_aggregation(void)
hres = CoCreateInstance(&CLSID_Registrar, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IUnknown, (void**)&unk);
ok(hres == CLASS_E_NOAGGREGATION || broken(hres == E_INVALIDARG),
- "CoCreateInstance failed: %08x, expected CLASS_E_NOAGGREGATION\n", hres);
+ "CoCreateInstance failed: %08lx, expected CLASS_E_NOAGGREGATION\n", hres);
ok(!unk || unk == (IUnknown*)0xdeadbeef, "unk = %p\n", unk);
}
More information about the wine-devel
mailing list