Nikolay Sivov : kernel32/tests: Remove workarounds for older versions.

Alexandre Julliard julliard at winehq.org
Mon Feb 26 13:42:18 CST 2018


Module: wine
Branch: master
Commit: e01909755689dc91c02a353d4ecc3f853bc5d11a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e01909755689dc91c02a353d4ecc3f853bc5d11a

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Feb 25 19:37:49 2018 +0300

kernel32/tests: Remove workarounds for older versions.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/version.c | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

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




More information about the wine-cvs mailing list