Commit f2710545 authored by Stefan Leichter's avatar Stefan Leichter Committed by Alexandre Julliard

Removed windows version checks from GetPrinterDriverDirectory tests.

parent e43a430d
...@@ -26,13 +26,6 @@ static void test_printer_directory(ivoid) ...@@ -26,13 +26,6 @@ static void test_printer_directory(ivoid)
{ LPBYTE buffer = NULL; { LPBYTE buffer = NULL;
DWORD cbBuf, pcbNeeded; DWORD cbBuf, pcbNeeded;
BOOL res; BOOL res;
OSVERSIONINFOA ver;
ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
if(!GetVersionExA( &ver)) {
ok( 0, "GetVersionExA failed!");
return ;
}
(void) GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, 0, &cbBuf); (void) GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, 0, &cbBuf);
...@@ -57,40 +50,26 @@ static void test_printer_directory(ivoid) ...@@ -57,40 +50,26 @@ static void test_printer_directory(ivoid)
GetLastError()); GetLastError());
res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, &pcbNeeded); res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, &pcbNeeded);
if(ver.dwPlatformId == VER_PLATFORM_WIN32_NT) { ok( (!res && ERROR_INVALID_USER_BUFFER == GetLastError()) ||
ok( !res , "expected result == 0, got %d", res); ( res && ERROR_INVALID_PARAMETER == GetLastError()) ,
ok( ERROR_INVALID_USER_BUFFER == GetLastError(), "expected either result == 0 and "
"last error set to %ld instead of ERROR_INVALID_USER_BUFFER", "last error == ERROR_INVALID_USER_BUFFER "
GetLastError()); "or result != 0 and last error == ERROR_INVALID_PARAMETER "
} else { "got result %d and last error == %ld", res, GetLastError());
ok( res , "expected result != 0, got %d", res);
ok( ERROR_INVALID_PARAMETER == GetLastError(),
"last error set to %ld instead of ERROR_INVALID_PARAMETER",
GetLastError());
}
res = GetPrinterDriverDirectoryA( NULL, NULL, 1, buffer, cbBuf, NULL); res = GetPrinterDriverDirectoryA( NULL, NULL, 1, buffer, cbBuf, NULL);
if(ver.dwPlatformId == VER_PLATFORM_WIN32_NT) { ok( (!res && RPC_X_NULL_REF_POINTER == GetLastError()) || res,
ok( !res , "expected result == 0, got %d", res); "expected either result == 0 and "
ok( RPC_X_NULL_REF_POINTER == GetLastError(), "last error == RPC_X_NULL_REF_POINTER or result != 0 "
"last error set to %ld instead of RPC_X_NULL_REF_POINTER", "got result %d and last error == %ld", res, GetLastError());
GetLastError());
} else {
ok( res , "expected result != 0, got %d", res);
}
res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, NULL); res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, NULL);
if(ver.dwPlatformId == VER_PLATFORM_WIN32_NT) { ok( (!res && RPC_X_NULL_REF_POINTER == GetLastError()) ||
ok( !res , "expected result == 0, got %d", res); ( res && ERROR_INVALID_PARAMETER == GetLastError()) ,
ok( RPC_X_NULL_REF_POINTER == GetLastError(), "expected either result == 0 and "
"last error set to %ld instead of RPC_X_NULL_REF_POINTER", "last error == RPC_X_NULL_REF_POINTER "
GetLastError()); "or result != 0 and last error == ERROR_INVALID_PARAMETER "
} else { "got result %d and last error == %ld", res, GetLastError());
ok( res , "expected result != 0, got %d", res);
ok( ERROR_INVALID_PARAMETER == GetLastError(),
"last error set to %ld instead of ERROR_INVALID_PARAMETER",
GetLastError());
}
HeapFree( GetProcessHeap(), 0, buffer); HeapFree( GetProcessHeap(), 0, buffer);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment