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
7dab5fe9
Commit
7dab5fe9
authored
Oct 21, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix version tests compilation with __WINESRC__ defined.
parent
965d903f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
version.c
dlls/kernel32/tests/version.c
+25
-25
No files found.
dlls/kernel32/tests/version.c
View file @
7dab5fe9
...
...
@@ -156,7 +156,7 @@ static void test_GetVersionEx(void)
static
void
test_VerifyVersionInfo
(
void
)
{
OSVERSIONINFOEX
info
;
OSVERSIONINFOEX
A
info
;
BOOL
ret
;
DWORD
servicepack
,
error
;
...
...
@@ -169,8 +169,8 @@ static void test_VerifyVersionInfo(void)
/* Before we start doing some tests we should check what the version of
* the ServicePack is. Tests on a box with no ServicePack will fail otherwise.
*/
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionExA
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionExA
((
OSVERSIONINFO
A
*
)
&
info
);
servicepack
=
info
.
wServicePackMajor
;
memset
(
&
info
,
0
,
sizeof
(
info
));
...
...
@@ -223,8 +223,8 @@ static void test_VerifyVersionInfo(void)
VER_MAJORVERSION
,
VER_GREATER_EQUAL
));
ok
(
ret
,
"VerifyVersionInfoA failed with error %d
\n
"
,
GetLastError
());
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
wServicePackMinor
++
;
SetLastError
(
0xdeadbeef
);
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
...
...
@@ -240,37 +240,37 @@ static void test_VerifyVersionInfo(void)
}
else
{
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
wServicePackMajor
--
;
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
pVerSetConditionMask
(
0
,
VER_MINORVERSION
,
VER_GREATER
));
ok
(
ret
||
broken
(
!
ret
)
/* some win2k */
,
"VerifyVersionInfoA failed with error %d
\n
"
,
GetLastError
());
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
wServicePackMajor
--
;
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
pVerSetConditionMask
(
0
,
VER_MINORVERSION
,
VER_GREATER_EQUAL
));
ok
(
ret
||
broken
(
!
ret
)
/* some win2k */
,
"VerifyVersionInfoA failed with error %d
\n
"
,
GetLastError
());
}
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
wServicePackMajor
++
;
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
pVerSetConditionMask
(
0
,
VER_MINORVERSION
,
VER_LESS
));
ok
(
ret
||
broken
(
!
ret
)
/* some win2k */
,
"VerifyVersionInfoA failed with error %d
\n
"
,
GetLastError
());
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
wServicePackMajor
++
;
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
pVerSetConditionMask
(
0
,
VER_MINORVERSION
,
VER_LESS_EQUAL
));
ok
(
ret
||
broken
(
!
ret
)
/* some win2k */
,
"VerifyVersionInfoA failed with error %d
\n
"
,
GetLastError
());
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
wServicePackMajor
--
;
SetLastError
(
0xdeadbeef
);
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
...
...
@@ -282,8 +282,8 @@ static void test_VerifyVersionInfo(void)
/* test the failure hierarchy for the four version fields */
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
wServicePackMajor
++
;
SetLastError
(
0xdeadbeef
);
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
...
...
@@ -293,8 +293,8 @@ static void test_VerifyVersionInfo(void)
ok
(
error
==
ERROR_OLD_WIN_VERSION
||
broken
(
error
==
ERROR_BAD_ARGUMENTS
)
/* some win2k */
,
"VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d
\n
"
,
error
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
dwMinorVersion
++
;
SetLastError
(
0xdeadbeef
);
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
...
...
@@ -304,8 +304,8 @@ static void test_VerifyVersionInfo(void)
ok
(
error
==
ERROR_OLD_WIN_VERSION
||
broken
(
error
==
ERROR_BAD_ARGUMENTS
)
/* some win2k */
,
"VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d
\n
"
,
error
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
dwMajorVersion
++
;
SetLastError
(
0xdeadbeef
);
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MAJORVERSION
|
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
...
...
@@ -319,8 +319,8 @@ static void test_VerifyVersionInfo(void)
pVerSetConditionMask
(
0
,
VER_MINORVERSION
,
VER_GREATER_EQUAL
));
ok
(
ret
||
broken
(
!
ret
)
/* some win2k */
,
"VerifyVersionInfoA failed with error %d
\n
"
,
GetLastError
());
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
dwBuildNumber
++
;
SetLastError
(
0xdeadbeef
);
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MAJORVERSION
|
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
...
...
@@ -335,8 +335,8 @@ static void test_VerifyVersionInfo(void)
ok
(
ret
||
broken
(
!
ret
)
/* some win2k */
,
"VerifyVersionInfoA failed with error %d
\n
"
,
GetLastError
());
/* test bad dwOSVersionInfoSize */
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
);
GetVersionEx
((
OSVERSIONINFO
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOEX
A
);
GetVersionEx
A
((
OSVERSIONINFOA
*
)
&
info
);
info
.
dwOSVersionInfoSize
=
0
;
ret
=
pVerifyVersionInfoA
(
&
info
,
VER_MAJORVERSION
|
VER_MINORVERSION
|
VER_SERVICEPACKMAJOR
|
VER_SERVICEPACKMINOR
,
pVerSetConditionMask
(
0
,
VER_MAJORVERSION
,
VER_GREATER_EQUAL
));
...
...
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