Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
79cf6468
Commit
79cf6468
authored
Nov 09, 2004
by
Stefan Leichter
Committed by
Alexandre Julliard
Nov 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GetFileVersionInfoSizeA tests on NT4 platform.
parent
b46a106a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
28 deletions
+31
-28
info.c
dlls/version/tests/info.c
+31
-28
No files found.
dlls/version/tests/info.c
View file @
79cf6468
...
...
@@ -24,56 +24,58 @@
#include "winerror.h"
#include "winver.h"
#define MY_LAST_ERROR -1L
#define EXPECT_BAD_PATH__NOT_FOUND \
ok( (ERROR_PATH_NOT_FOUND == GetLastError()) || \
(ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError()) || \
(ERROR_BAD_PATHNAME == GetLastError()), \
"Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_BAD_PATHNAME (98)/" \
"ERROR_PATH_NOT_FOUND (NT4) expected, got 0x%08lx\n", GetLastError());
#define EXPECT_INVALID__NOT_FOUND \
ok( (ERROR_PATH_NOT_FOUND == GetLastError()) || \
(ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError()) || \
(ERROR_INVALID_PARAMETER == GetLastError()), \
"Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_INVALID_PARAMETER (98)/" \
"ERROR_PATH_NOT_FOUND (NT4) expected, got 0x%08lx\n", GetLastError());
static
void
test_info_size
(
void
)
{
DWORD
hdl
,
retval
;
SetLastError
(
-
1L
);
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
NULL
,
NULL
);
ok
(
!
retval
,
"GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx
\n
"
,
retval
);
ok
(
(
ERROR_RESOURCE_DATA_NOT_FOUND
==
GetLastError
())
||
(
ERROR_INVALID_PARAMETER
==
GetLastError
()),
"Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_INVALID_PARAMETER "
"(98) expected, got 0x%08lx
\n
"
,
GetLastError
());
EXPECT_INVALID__NOT_FOUND
;
hdl
=
0x55555555
;
SetLastError
(
-
1L
);
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
NULL
,
&
hdl
);
ok
(
!
retval
,
"GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx
\n
"
,
retval
);
ok
(
(
ERROR_RESOURCE_DATA_NOT_FOUND
==
GetLastError
())
||
(
ERROR_INVALID_PARAMETER
==
GetLastError
()),
"Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_INVALID_PARAMETER "
"(98) expected, got 0x%08lx
\n
"
,
GetLastError
());
EXPECT_INVALID__NOT_FOUND
;
ok
(
hdl
==
0L
,
"Handle wrong! 0L expected, got 0x%08lx
\n
"
,
hdl
);
SetLastError
(
-
1L
);
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
""
,
NULL
);
ok
(
!
retval
,
"GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx
\n
"
,
retval
);
ok
(
(
ERROR_RESOURCE_DATA_NOT_FOUND
==
GetLastError
())
||
(
ERROR_BAD_PATHNAME
==
GetLastError
()),
"Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_BAD_PATHNAME "
"(98) expected, got 0x%08lx
\n
"
,
GetLastError
());
EXPECT_BAD_PATH__NOT_FOUND
;
hdl
=
0x55555555
;
SetLastError
(
-
1L
);
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
""
,
&
hdl
);
ok
(
!
retval
,
"GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx
\n
"
,
retval
);
ok
(
(
ERROR_RESOURCE_DATA_NOT_FOUND
==
GetLastError
())
||
(
ERROR_BAD_PATHNAME
==
GetLastError
()),
"Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_BAD_PATHNAME "
"(98) expected, got 0x%08lx
\n
"
,
GetLastError
());
EXPECT_BAD_PATH__NOT_FOUND
;
ok
(
hdl
==
0L
,
"Handle wrong! 0L expected, got 0x%08lx
\n
"
,
hdl
);
SetLastError
(
-
1L
);
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
"kernel32.dll"
,
NULL
);
ok
(
retval
,
"GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx
\n
"
,
...
...
@@ -83,26 +85,27 @@ static void test_info_size(void)
GetLastError
());
hdl
=
0x55555555
;
SetLastError
(
-
1L
);
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
"kernel32.dll"
,
&
hdl
);
ok
(
retval
,
"GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx
\n
"
,
retval
);
ok
(
NO_ERROR
==
GetLastError
(
),
"Last error wrong! NO_ERROR expected, got 0x%08lx
\n
"
,
GetLastError
());
ok
(
(
NO_ERROR
==
GetLastError
())
||
(
MY_LAST_ERROR
==
GetLastError
()
),
"Last error wrong! NO_ERROR
/0x%08lx (NT4)
expected, got 0x%08lx
\n
"
,
MY_LAST_ERROR
,
GetLastError
());
ok
(
hdl
==
0L
,
"Handle wrong! 0L expected, got 0x%08lx
\n
"
,
hdl
);
SetLastError
(
-
1L
);
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
"notexist.dll"
,
NULL
);
ok
(
!
retval
,
"GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx
\n
"
,
retval
);
ok
(
(
ERROR_FILE_NOT_FOUND
==
GetLastError
())
||
(
ERROR_RESOURCE_DATA_NOT_FOUND
==
GetLastError
()),
(
ERROR_RESOURCE_DATA_NOT_FOUND
==
GetLastError
())
||
(
MY_LAST_ERROR
==
GetLastError
()),
"Last error wrong! ERROR_FILE_NOT_FOUND/ERROR_RESOURCE_DATA_NOT_FOUND "
"(XP)
expected, got 0x%08lx
\n
"
,
GetLastError
());
"(XP)
/0x%08lx (NT4) expected, got 0x%08lx
\n
"
,
MY_LAST_ERROR
,
GetLastError
());
}
START_TEST
(
info
)
...
...
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