From bbbd5a4917c4b9d21f8846adceb95ffa3a18d02b Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Sun, 28 Nov 2010 15:40:31 +0100 Subject: [PATCH] atl/tests: Skip tests on old versions of atl.dll. --- dlls/atl/tests/registrar.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/atl/tests/registrar.c b/dlls/atl/tests/registrar.c index 422608b9479..9c5dd23e19b 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");