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
ae206d75
Commit
ae206d75
authored
Oct 24, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Oct 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version/tests: Fix tests compilation with __WINESRC__ defined.
parent
33018d39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
20 deletions
+19
-20
Makefile.in
dlls/version/tests/Makefile.in
+0
-1
info.c
dlls/version/tests/info.c
+19
-19
No files found.
dlls/version/tests/Makefile.in
View file @
ae206d75
TESTDLL
=
version.dll
IMPORTS
=
version
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
info.c
\
...
...
dlls/version/tests/info.c
View file @
ae206d75
...
...
@@ -457,7 +457,7 @@ static void test_32bit_win(void)
HeapFree
(
GetProcessHeap
(),
0
,
pVersionInfoW
);
}
static
void
test_VerQueryValue
(
void
)
static
void
test_VerQueryValue
A
(
void
)
{
static
const
char
*
const
value_name
[]
=
{
"Product"
,
"CompanyName"
,
"FileDescription"
,
"Internal"
,
...
...
@@ -468,24 +468,24 @@ static void test_VerQueryValue(void)
UINT
len
,
ret
,
translation
,
i
;
char
buf
[
MAX_PATH
];
ret
=
GetModuleFileName
(
NULL
,
buf
,
sizeof
(
buf
));
ret
=
GetModuleFileName
A
(
NULL
,
buf
,
sizeof
(
buf
));
assert
(
ret
);
SetLastError
(
0xdeadbeef
);
len
=
GetFileVersionInfoSize
(
buf
,
NULL
);
ok
(
len
,
"GetFileVersionInfoSize(%s) error %u
\n
"
,
buf
,
GetLastError
());
len
=
GetFileVersionInfoSize
A
(
buf
,
NULL
);
ok
(
len
,
"GetFileVersionInfoSize
A
(%s) error %u
\n
"
,
buf
,
GetLastError
());
ver
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
assert
(
ver
);
SetLastError
(
0xdeadbeef
);
ret
=
GetFileVersionInfo
(
buf
,
0
,
len
,
ver
);
ok
(
ret
,
"GetFileVersionInfo error %u
\n
"
,
GetLastError
());
ret
=
GetFileVersionInfo
A
(
buf
,
0
,
len
,
ver
);
ok
(
ret
,
"GetFileVersionInfo
A
error %u
\n
"
,
GetLastError
());
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
"
\\
VarFileInfo
\\
Translation"
,
(
LPVOID
*
)
&
p
,
&
len
);
ret
=
VerQueryValue
A
(
ver
,
"
\\
VarFileInfo
\\
Translation"
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
ret
,
"VerQueryValue error %u
\n
"
,
GetLastError
());
ok
(
len
==
4
,
"VerQueryValue returned %u, expected 4
\n
"
,
len
);
...
...
@@ -495,7 +495,7 @@ static void test_VerQueryValue(void)
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
"String"
,
(
LPVOID
*
)
&
p
,
&
len
);
ret
=
VerQueryValue
A
(
ver
,
"String"
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
!
ret
,
"VerQueryValue should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_RESOURCE_TYPE_NOT_FOUND
||
GetLastError
()
==
0xdeadbeef
/* NT4, W2K */
,
...
...
@@ -506,7 +506,7 @@ static void test_VerQueryValue(void)
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
"StringFileInfo"
,
(
LPVOID
*
)
&
p
,
&
len
);
ret
=
VerQueryValue
A
(
ver
,
"StringFileInfo"
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
ret
,
"VerQueryValue error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
len
==
0
,
"VerQueryValue returned %u, expected 0
\n
"
,
len
);
ok
(
p
!=
(
char
*
)
0xdeadbeef
,
"not expected 0xdeadbeef
\n
"
);
...
...
@@ -514,7 +514,7 @@ todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len);
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
"
\\
StringFileInfo"
,
(
LPVOID
*
)
&
p
,
&
len
);
ret
=
VerQueryValue
A
(
ver
,
"
\\
StringFileInfo"
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
ret
,
"VerQueryValue error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
len
==
0
,
"VerQueryValue returned %u, expected 0
\n
"
,
len
);
ok
(
p
!=
(
char
*
)
0xdeadbeef
,
"not expected 0xdeadbeef
\n
"
);
...
...
@@ -522,7 +522,7 @@ todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len);
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
"
\\\\
StringFileInfo"
,
(
LPVOID
*
)
&
p
,
&
len
);
ret
=
VerQueryValue
A
(
ver
,
"
\\\\
StringFileInfo"
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
ret
,
"VerQueryValue error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
len
==
0
,
"VerQueryValue returned %u, expected 0
\n
"
,
len
);
ok
(
p
!=
(
char
*
)
0xdeadbeef
,
"not expected 0xdeadbeef
\n
"
);
...
...
@@ -530,7 +530,7 @@ todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len);
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
"
\\
StringFileInfo
\\\\
"
,
(
LPVOID
*
)
&
p
,
&
len
);
ret
=
VerQueryValue
A
(
ver
,
"
\\
StringFileInfo
\\\\
"
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
ret
,
"VerQueryValue error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
len
==
0
,
"VerQueryValue returned %u, expected 0
\n
"
,
len
);
ok
(
p
!=
(
char
*
)
0xdeadbeef
,
"not expected 0xdeadbeef
\n
"
);
...
...
@@ -539,7 +539,7 @@ todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len);
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
buf
,
(
LPVOID
*
)
&
p
,
&
len
);
ret
=
VerQueryValue
A
(
ver
,
buf
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
ret
,
"VerQueryValue error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
len
==
0
,
"VerQueryValue returned %u, expected 0
\n
"
,
len
);
ok
(
p
!=
(
char
*
)
0xdeadbeef
,
"not expected 0xdeadbeef
\n
"
);
...
...
@@ -550,20 +550,20 @@ todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len);
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
buf
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
ret
,
"VerQueryValue(%s) error %u
\n
"
,
buf
,
GetLastError
());
ret
=
VerQueryValue
A
(
ver
,
buf
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
ret
,
"VerQueryValue
A
(%s) error %u
\n
"
,
buf
,
GetLastError
());
ok
(
len
==
strlen
(
value_name
[
i
])
+
1
,
"VerQueryValue returned %u
\n
"
,
len
);
ok
(
!
strcmp
(
value_name
[
i
],
p
),
"expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
value_name
[
i
],
p
);
/* test partial value names */
len
=
lstrlen
(
buf
);
len
=
lstrlen
A
(
buf
);
buf
[
len
-
2
]
=
0
;
p
=
(
char
*
)
0xdeadbeef
;
len
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
VerQueryValue
(
ver
,
buf
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
!
ret
,
"VerQueryValue(%s) succeeded
\n
"
,
buf
);
ret
=
VerQueryValue
A
(
ver
,
buf
,
(
LPVOID
*
)
&
p
,
&
len
);
ok
(
!
ret
,
"VerQueryValue
A
(%s) succeeded
\n
"
,
buf
);
ok
(
GetLastError
()
==
ERROR_RESOURCE_TYPE_NOT_FOUND
||
GetLastError
()
==
0xdeadbeef
/* NT4, W2K */
,
"VerQueryValue returned %u
\n
"
,
GetLastError
());
...
...
@@ -579,5 +579,5 @@ START_TEST(info)
test_info_size
();
test_info
();
test_32bit_win
();
test_VerQueryValue
();
test_VerQueryValue
A
();
}
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