Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e0190975
Commit
e0190975
authored
Feb 25, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Remove workarounds for older versions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
60a5ee65
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
version.c
dlls/kernel32/tests/version.c
+9
-15
No files found.
dlls/kernel32/tests/version.c
View file @
e0190975
...
...
@@ -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
=
p
VerifyVersionInfoA
(
&
info
,
VER_MAJORVERSION
|
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
pVerSetConditionMask
(
p
VerSetConditionMask
(
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
=
p
VerifyVersionInfoA
(
&
info
,
VER_MAJORVERSION
|
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
pVerSetConditionMask
(
p
VerSetConditionMask
(
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
=
p
VerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
pVerSetConditionMask
(
p
VerSetConditionMask
(
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
=
p
VerifyVersionInfoA
(
&
info
,
VER_MAJORVERSION
|
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
p
VerSetConditionMask
(
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
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment