setupapi/tests: Use win_skip() to skip over unimplemented functionality.

This commit is contained in:
Francois Gouget 2009-02-23 10:41:15 +01:00 committed by Alexandre Julliard
parent 8b28508d2b
commit 292a10424d
3 changed files with 14 additions and 14 deletions

View File

@ -259,7 +259,7 @@ static void test_SetupDiCreateDeviceInfoListEx(void)
error = GetLastError(); error = GetLastError();
if (error == ERROR_CALL_NOT_IMPLEMENTED) if (error == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("SetupDiCreateDeviceInfoListExW is not implemented\n"); win_skip("SetupDiCreateDeviceInfoListExW is not implemented\n");
return; return;
} }
ok(devlist == INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected %p)\n", devlist, error, INVALID_HANDLE_VALUE); ok(devlist == INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected %p)\n", devlist, error, INVALID_HANDLE_VALUE);
@ -667,7 +667,7 @@ static void testCreateDeviceInterface(void)
if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiEnumDeviceInterfaces) if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiEnumDeviceInterfaces)
{ {
skip("SetupDiCreateDeviceInterfaceA and/or SetupDiEnumDeviceInterfaces are not available\n"); win_skip("SetupDiCreateDeviceInterfaceA and/or SetupDiEnumDeviceInterfaces are not available\n");
return; return;
} }
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
@ -764,7 +764,7 @@ static void testGetDeviceInterfaceDetail(void)
if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiGetDeviceInterfaceDetailA) if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiGetDeviceInterfaceDetailA)
{ {
skip("SetupDiCreateDeviceInterfaceA and/or SetupDiGetDeviceInterfaceDetailA are not available\n"); win_skip("SetupDiCreateDeviceInterfaceA and/or SetupDiGetDeviceInterfaceDetailA are not available\n");
return; return;
} }
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
@ -1051,7 +1051,7 @@ static void testRegisterAndGetDetail(void)
if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiEnumDeviceInterfaces || if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiEnumDeviceInterfaces ||
!pSetupDiGetDeviceInterfaceDetailA) !pSetupDiGetDeviceInterfaceDetailA)
{ {
skip("Needed functions are not available\n"); win_skip("Needed functions are not available\n");
return; return;
} }
@ -1357,19 +1357,19 @@ START_TEST(devinst)
set = pSetupDiGetClassDevsW(NULL, NULL, 0, 0); set = pSetupDiGetClassDevsW(NULL, NULL, 0, 0);
if (set == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if (set == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
skip("Win9x/WinMe has totally different behavior\n"); win_skip("Win9x/WinMe has totally different behavior\n");
return; return;
} }
if (pSetupDiCreateDeviceInfoListExW) if (pSetupDiCreateDeviceInfoListExW)
test_SetupDiCreateDeviceInfoListEx(); test_SetupDiCreateDeviceInfoListEx();
else else
skip("SetupDiCreateDeviceInfoListExW is not available\n"); win_skip("SetupDiCreateDeviceInfoListExW is not available\n");
if (pSetupDiOpenClassRegKeyExA) if (pSetupDiOpenClassRegKeyExA)
test_SetupDiOpenClassRegKeyExA(); test_SetupDiOpenClassRegKeyExA();
else else
skip("SetupDiOpenClassRegKeyExA is not available\n"); win_skip("SetupDiOpenClassRegKeyExA is not available\n");
testInstallClass(); testInstallClass();
testCreateDeviceInfo(); testCreateDeviceInfo();

View File

@ -190,7 +190,7 @@ static void test_install_svc_from(void)
if (!scm_handle && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) if (!scm_handle && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{ {
skip("OpenSCManagerA is not implemented, we are most likely on win9x\n"); win_skip("OpenSCManagerA is not implemented, we are most likely on win9x\n");
return; return;
} }
CloseServiceHandle(scm_handle); CloseServiceHandle(scm_handle);
@ -348,7 +348,7 @@ static void test_driver_install(void)
if (!scm_handle && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) if (!scm_handle && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{ {
skip("OpenSCManagerA is not implemented, we are most likely on win9x\n"); win_skip("OpenSCManagerA is not implemented, we are most likely on win9x\n");
return; return;
} }
else if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED)) else if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED))
@ -421,7 +421,7 @@ static void test_profile_items(void)
pSHGetFolderPathA = (void*)GetProcAddress(hShell32, "SHGetFolderPathA"); pSHGetFolderPathA = (void*)GetProcAddress(hShell32, "SHGetFolderPathA");
if (!pSHGetFolderPathA) if (!pSHGetFolderPathA)
{ {
skip("SHGetFolderPathA is not available\n"); win_skip("SHGetFolderPathA is not available\n");
goto cleanup; goto cleanup;
} }
@ -500,7 +500,7 @@ START_TEST(install)
ok(DeleteFile(inffile), "Expected source inf to exist, last error was %d\n", GetLastError()); ok(DeleteFile(inffile), "Expected source inf to exist, last error was %d\n", GetLastError());
} }
if (!pInstallHinfSectionW && !pInstallHinfSectionA) if (!pInstallHinfSectionW && !pInstallHinfSectionA)
skip("InstallHinfSectionA and InstallHinfSectionW are not available\n"); win_skip("InstallHinfSectionA and InstallHinfSectionW are not available\n");
else else
{ {
/* Set CBT hook to disallow MessageBox creation in current thread */ /* Set CBT hook to disallow MessageBox creation in current thread */

View File

@ -107,7 +107,7 @@ static void test_original_file_name(LPCSTR original, LPCSTR dest)
if (!pSetupQueryInfOriginalFileInformationA) if (!pSetupQueryInfOriginalFileInformationA)
{ {
skip("SetupQueryInfOriginalFileInformationA is not available\n"); win_skip("SetupQueryInfOriginalFileInformationA is not available\n");
return; return;
} }
@ -591,14 +591,14 @@ START_TEST(misc)
if (pSetupCopyOEMInfA) if (pSetupCopyOEMInfA)
test_SetupCopyOEMInf(); test_SetupCopyOEMInf();
else else
skip("SetupCopyOEMInfA is not available\n"); win_skip("SetupCopyOEMInfA is not available\n");
test_SetupGetFileCompressionInfo(); test_SetupGetFileCompressionInfo();
if (pSetupGetFileCompressionInfoExA) if (pSetupGetFileCompressionInfoExA)
test_SetupGetFileCompressionInfoEx(); test_SetupGetFileCompressionInfoEx();
else else
skip("SetupGetFileCompressionInfoExA is not available\n"); win_skip("SetupGetFileCompressionInfoExA is not available\n");
test_SetupDecompressOrCopyFile(); test_SetupDecompressOrCopyFile();
} }