atl/tests: Skip tests on old versions of atl.dll.
This commit is contained in:
parent
92705a48dc
commit
bbbd5a4917
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue