Commit e0190975 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

kernel32/tests: Remove workarounds for older versions.

parent 60a5ee65
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
#include "winternl.h" #include "winternl.h"
static BOOL (WINAPI * pGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD *); static BOOL (WINAPI * pGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD *);
static BOOL (WINAPI * pVerifyVersionInfoA)(LPOSVERSIONINFOEXA, DWORD, DWORDLONG);
static ULONGLONG (WINAPI * pVerSetConditionMask)(ULONGLONG, DWORD, BYTE);
static NTSTATUS (WINAPI * pRtlGetVersion)(RTL_OSVERSIONINFOEXW *); static NTSTATUS (WINAPI * pRtlGetVersion)(RTL_OSVERSIONINFOEXW *);
#define GET_PROC(func) \ #define GET_PROC(func) \
...@@ -40,8 +38,6 @@ static void init_function_pointers(void) ...@@ -40,8 +38,6 @@ static void init_function_pointers(void)
hmod = GetModuleHandleA("kernel32.dll"); hmod = GetModuleHandleA("kernel32.dll");
GET_PROC(GetProductInfo); GET_PROC(GetProductInfo);
GET_PROC(VerifyVersionInfoA);
GET_PROC(VerSetConditionMask);
hmod = GetModuleHandleA("ntdll.dll"); hmod = GetModuleHandleA("ntdll.dll");
...@@ -153,9 +149,7 @@ static void test_GetVersionEx(void) ...@@ -153,9 +149,7 @@ static void test_GetVersionEx(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
infoExA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); infoExA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
ret = GetVersionExA((OSVERSIONINFOA *)&infoExA); ret = GetVersionExA((OSVERSIONINFOA *)&infoExA);
ok(ret || ok(ret, "GetVersionExA failed.\n");
broken(ret == 0), /* win95 */
"Expected GetVersionExA to succeed\n");
if (!infoExA.wServicePackMajor && !infoExA.wServicePackMinor) if (!infoExA.wServicePackMajor && !infoExA.wServicePackMinor)
ok(!infoExA.szCSDVersion[0], "got '%s'\n", infoExA.szCSDVersion); ok(!infoExA.szCSDVersion[0], "got '%s'\n", infoExA.szCSDVersion);
...@@ -689,22 +683,22 @@ static void test_VerifyVersionInfo(void) ...@@ -689,22 +683,22 @@ static void test_VerifyVersionInfo(void)
* if the minor version is tested */ * if the minor version is tested */
info.dwMajorVersion = 3; info.dwMajorVersion = 3;
info.dwMinorVersion = 10; info.dwMinorVersion = 10;
ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL),
VER_MAJORVERSION, VER_GREATER_EQUAL)); VER_MAJORVERSION, VER_GREATER_EQUAL));
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
info.dwMinorVersion = 0; info.dwMinorVersion = 0;
info.wServicePackMajor = 10; info.wServicePackMajor = 10;
ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL),
VER_MAJORVERSION, VER_GREATER_EQUAL)); VER_MAJORVERSION, VER_GREATER_EQUAL));
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
info.wServicePackMajor = 0; info.wServicePackMajor = 0;
info.wServicePackMinor = 10; info.wServicePackMinor = 10;
ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL),
VER_MAJORVERSION, VER_GREATER_EQUAL)); VER_MAJORVERSION, VER_GREATER_EQUAL));
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
...@@ -712,8 +706,8 @@ static void test_VerifyVersionInfo(void) ...@@ -712,8 +706,8 @@ static void test_VerifyVersionInfo(void)
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
GetVersionExA((OSVERSIONINFOA *)&info); GetVersionExA((OSVERSIONINFOA *)&info);
info.dwOSVersionInfoSize = 0; info.dwOSVersionInfoSize = 0;
ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL)); VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL));
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
} }
......
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