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
8c5a301d
Commit
8c5a301d
authored
Mar 04, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rasapi32/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
65f36a96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
25 deletions
+24
-25
Makefile.in
dlls/rasapi32/tests/Makefile.in
+0
-1
rasapi.c
dlls/rasapi32/tests/rasapi.c
+24
-24
No files found.
dlls/rasapi32/tests/Makefile.in
View file @
8c5a301d
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
rasapi32.dll
C_SRCS
=
\
...
...
dlls/rasapi32/tests/rasapi.c
View file @
8c5a301d
...
...
@@ -64,9 +64,9 @@ static void test_rasenum(void)
win_skip
(
"RasEnumDevicesA found nothing to enumerate
\n
"
);
return
;
}
trace
(
"RasEnumDevicesA: returned %
d buffersize %
d
\n
"
,
result
,
bufsize
);
trace
(
"RasEnumDevicesA: returned %
ld buffersize %l
d
\n
"
,
result
,
bufsize
);
ok
(
result
==
ERROR_BUFFER_TOO_SMALL
,
"Expected ERROR_BUFFER_TOO_SMALL, got %08d
\n
"
,
result
);
"Expected ERROR_BUFFER_TOO_SMALL, got %08
l
d
\n
"
,
result
);
rasDevInfo
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
max
(
bufsize
,
sizeof
(
RASDEVINFOA
)));
...
...
@@ -79,99 +79,99 @@ static void test_rasenum(void)
cb
=
bufsize
;
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
NULL
,
&
cb
,
&
cDevices
);
ok
(
0
<
cDevices
&&
cDevices
<
32
,
"expected 0 < cDevices < 32, got %u
\n
"
,
cDevices
);
ok
(
0
<
cDevices
&&
cDevices
<
32
,
"expected 0 < cDevices < 32, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_BUFFER_TOO_SMALL
||
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
"Expected ERROR_BUFFER_TOO_SMALL, got %08d
\n
"
,
result
);
"Expected ERROR_BUFFER_TOO_SMALL, got %08
l
d
\n
"
,
result
);
rasDevInfo
[
0
].
dwSize
=
0
;
cb
=
bufsize
;
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %u
\n
"
,
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_INVALID_SIZE
||
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_SIZE, got %08
l
d
\n
"
,
result
);
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
)
-
1
;
cb
=
bufsize
;
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %u
\n
"
,
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_INVALID_SIZE
||
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_SIZE, got %08
l
d
\n
"
,
result
);
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
)
+
1
;
cb
=
bufsize
;
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %u
\n
"
,
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_INVALID_SIZE
||
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_SIZE, got %08
l
d
\n
"
,
result
);
/* test second parameter */
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
);
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
NULL
,
&
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %u
\n
"
,
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_PARAMETER, got %08
l
d
\n
"
,
result
);
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
);
cb
=
0
;
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
todo_wine
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %u
\n
"
,
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_BUFFER_TOO_SMALL
||
result
==
ERROR_INVALID_SIZE
,
/* vista, 2k8 */
"Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08
l
d
\n
"
,
result
);
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
);
cb
=
bufsize
-
1
;
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
ok
(
0
<
cDevices
&&
cDevices
<
32
,
"expected 0 < cDevices < 32, got %u
\n
"
,
cDevices
);
ok
(
0
<
cDevices
&&
cDevices
<
32
,
"expected 0 < cDevices < 32, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_BUFFER_TOO_SMALL
,
"Expected ERROR_BUFFER_TOO_SMALL, got %08d
\n
"
,
result
);
"Expected ERROR_BUFFER_TOO_SMALL, got %08
l
d
\n
"
,
result
);
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
);
cb
=
bufsize
+
1
;
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
ok
(
0
<
cDevices
&&
cDevices
<
32
,
"expected 0 < cDevices < 32, got %u
\n
"
,
cDevices
);
ok
(
0
<
cDevices
&&
cDevices
<
32
,
"expected 0 < cDevices < 32, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %08d
\n
"
,
result
);
"Expected ERROR_SUCCESS, got %08
l
d
\n
"
,
result
);
/* test third parameter */
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
);
cb
=
bufsize
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
NULL
);
ok
(
result
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_PARAMETER, got %08
l
d
\n
"
,
result
);
/* test combinations of invalid parameters */
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
NULL
,
NULL
,
&
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %u
\n
"
,
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_PARAMETER, got %08
l
d
\n
"
,
result
);
result
=
pRasEnumDevicesA
(
NULL
,
&
cb
,
NULL
);
ok
(
result
==
ERROR_INVALID_PARAMETER
||
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
"Expected ERROR_INVALID_PARAMETER, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_PARAMETER, got %08
l
d
\n
"
,
result
);
cb
=
0
;
rasDevInfo
[
0
].
dwSize
=
0
;
cDevices
=
0xdeadbeef
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %u
\n
"
,
cDevices
);
ok
(
cDevices
==
0xdeadbeef
,
"expected cDevices = 0xdeadbeef, got %
l
u
\n
"
,
cDevices
);
ok
(
result
==
ERROR_INVALID_SIZE
||
broken
(
result
==
ERROR_BUFFER_TOO_SMALL
),
/* win98 */
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_SIZE, got %08
l
d
\n
"
,
result
);
HeapFree
(
GetProcessHeap
(),
0
,
rasDevInfo
);
}
...
...
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