[PATCH 2/2] Skip tests on old versions of atl.dll
Paul Vriens
Paul.Vriens.Wine at gmail.com
Sun Nov 28 08:40:31 CST 2010
---
dlls/atl/tests/registrar.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/atl/tests/registrar.c b/dlls/atl/tests/registrar.c
index 422608b..9c5dd23 100644
--- a/dlls/atl/tests/registrar.c
+++ b/dlls/atl/tests/registrar.c
@@ -59,6 +59,12 @@ static void test_registrar(void)
INT count;
WCHAR *textW = NULL;
+ if (!GetProcAddress(GetModuleHandleA("atl.dll"), "AtlAxAttachControl"))
+ {
+ win_skip("Old versions of atl.dll don't support binary values\n");
+ return;
+ }
+
hr = CoCreateInstance(&CLSID_Registrar, NULL, CLSCTX_INPROC_SERVER, &IID_IRegistrar, (void**)®istrar);
if (FAILED(hr))
{
@@ -78,7 +84,7 @@ static void test_registrar(void)
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, count);
hr = IRegistrar_StringRegister(registrar, textW);
- ok(SUCCEEDED(hr), "IRegistar_StringRegister failed, hr = 0x%08X\n", hr);
+ ok(SUCCEEDED(hr), "IRegistrar_StringRegister failed, hr = 0x%08X\n", hr);
lret = RegOpenKeyA(HKEY_CLASSES_ROOT, "eebf73c4-50fd-478f-bbcf-db212221227a", &key);
ok(lret == ERROR_SUCCESS, "error %d opening registry key\n", lret);
@@ -106,20 +112,22 @@ static void test_registrar(void)
size = 4;
lret = RegQueryValueExA(key, "binary_quoted", NULL, NULL, bytes, &size);
ok(lret == ERROR_SUCCESS, "RegQueryValueA, failed, error %d\n", lret);
- ok(bytes[0] = 0xde && bytes[1] == 0xad && bytes[2] == 0xbe && bytes[3] == 0xef,
+ 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(bytes[0] = 0xde && bytes[1] == 0xad && bytes[2] == 0xbe && bytes[3] == 0xef,
+ ok(bytes[0] == 0xde && bytes[1] == 0xad && bytes[2] == 0xbe && bytes[3] == 0xef,
"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), "IRegistar_StringUnregister failed, hr = 0x%08X\n", hr);
+ ok(SUCCEEDED(hr), "IRegistrar_StringUnregister failed, hr = 0x%08X\n", hr);
RegCloseKey(key);
+
+ HeapFree(GetProcessHeap(), 0, textW);
}
else
skip("allocating memory failed\n");
--
1.7.2.3
--------------090403060702020501060102--
More information about the wine-patches
mailing list