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
93707e93
Commit
93707e93
authored
Mar 01, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpr/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b38dbf93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
38 deletions
+37
-38
Makefile.in
dlls/mpr/tests/Makefile.in
+0
-1
mpr.c
dlls/mpr/tests/mpr.c
+37
-37
No files found.
dlls/mpr/tests/Makefile.in
View file @
93707e93
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
mpr.dll
IMPORTS
=
mpr
...
...
dlls/mpr/tests/mpr.c
View file @
93707e93
...
...
@@ -41,51 +41,51 @@ static void test_WNetGetUniversalName(void)
buffer
,
&
info_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
else
/* WN_NO_NET_OR_BAD_PATH (DRIVE_FIXED) returned from the virtual drive (usual Q:)
created by the microsoft application virtualization client */
ok
((
ret
==
WN_NOT_CONNECTED
)
||
(
ret
==
WN_NO_NET_OR_BAD_PATH
),
"WNetGetUniversalNameA(%s, ...) returned %
u (drive_type: %
u)
\n
"
,
"WNetGetUniversalNameA(%s, ...) returned %
lu (drive_type: %l
u)
\n
"
,
driveA
,
ret
,
drive_type
);
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %u
\n
"
,
info_size
);
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %
l
u
\n
"
,
info_size
);
fail_size
=
1
;
ret
=
WNetGetUniversalNameA
(
driveA
,
UNIVERSAL_NAME_INFO_LEVEL
,
buffer
,
&
fail_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
{
todo_wine
ok
(
ret
==
WN_BAD_VALUE
||
ret
==
WN_MORE_DATA
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
ok
(
fail_size
>
1
,
"Got %d
\n
"
,
fail_size
);
todo_wine
ok
(
ret
==
WN_BAD_VALUE
||
ret
==
WN_MORE_DATA
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
ok
(
fail_size
>
1
,
"Got %
l
d
\n
"
,
fail_size
);
}
else
ok
(
ret
==
WN_NOT_CONNECTED
||
ret
==
WN_NO_NET_OR_BAD_PATH
,
"(%s) WNetGetUniversalNameW gave wrong error: %u
\n
"
,
driveA
,
ret
);
"(%s) WNetGetUniversalNameW gave wrong error: %
l
u
\n
"
,
driveA
,
ret
);
fail_size
=
ARRAY_SIZE
(
driveA
)
-
1
;
ret
=
WNetGetUniversalNameA
(
driveA
,
UNIVERSAL_NAME_INFO_LEVEL
,
buffer
,
&
fail_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
ok
(
ret
==
WN_MORE_DATA
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
ok
(
ret
==
WN_MORE_DATA
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
ret
=
WNetGetUniversalNameA
(
driveandpathA
,
UNIVERSAL_NAME_INFO_LEVEL
,
buffer
,
&
info_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
todo_wine
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
todo_wine
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
info_size
=
sizeof
(
buffer
);
ret
=
WNetGetUniversalNameW
(
driveW
,
UNIVERSAL_NAME_INFO_LEVEL
,
buffer
,
&
info_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameW failed: %08x
\n
"
,
ret
);
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameW failed: %08
l
x
\n
"
,
ret
);
else
ok
((
ret
==
WN_NOT_CONNECTED
)
||
(
ret
==
WN_NO_NET_OR_BAD_PATH
),
"WNetGetUniversalNameW(%s, ...) returned %
u (drive_type: %
u)
\n
"
,
"WNetGetUniversalNameW(%s, ...) returned %
lu (drive_type: %l
u)
\n
"
,
wine_dbgstr_w
(
driveW
),
ret
,
drive_type
);
if
(
drive_type
!=
DRIVE_REMOTE
)
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %u
\n
"
,
info_size
);
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %
l
u
\n
"
,
info_size
);
}
}
...
...
@@ -106,57 +106,57 @@ static void test_WNetGetRemoteName(void)
buffer
,
&
info_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
todo_wine
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
else
ok
(
ret
==
WN_NOT_CONNECTED
||
ret
==
WN_NO_NET_OR_BAD_PATH
,
"(%s) WNetGetUniversalNameA gave wrong error: %u
\n
"
,
driveA
,
ret
);
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %u
\n
"
,
info_size
);
"(%s) WNetGetUniversalNameA gave wrong error: %
l
u
\n
"
,
driveA
,
ret
);
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %
l
u
\n
"
,
info_size
);
fail_size
=
0
;
ret
=
WNetGetUniversalNameA
(
driveA
,
REMOTE_NAME_INFO_LEVEL
,
buffer
,
&
fail_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
todo_wine
ok
(
ret
==
WN_BAD_VALUE
||
ret
==
WN_MORE_DATA
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
ok
(
ret
==
WN_BAD_VALUE
||
ret
==
WN_MORE_DATA
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
else
ok
(
ret
==
WN_NOT_CONNECTED
||
ret
==
WN_NO_NET_OR_BAD_PATH
,
"(%s) WNetGetUniversalNameA gave wrong error: %u
\n
"
,
driveA
,
ret
);
"(%s) WNetGetUniversalNameA gave wrong error: %
l
u
\n
"
,
driveA
,
ret
);
ret
=
WNetGetUniversalNameA
(
driveA
,
REMOTE_NAME_INFO_LEVEL
,
buffer
,
NULL
);
todo_wine
ok
(
ret
==
WN_BAD_POINTER
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
todo_wine
ok
(
ret
==
WN_BAD_POINTER
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
ret
=
WNetGetUniversalNameA
(
driveA
,
REMOTE_NAME_INFO_LEVEL
,
NULL
,
&
info_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
todo_wine
ok
(
ret
==
WN_BAD_POINTER
||
ret
==
WN_BAD_VALUE
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
ok
(
ret
==
WN_BAD_POINTER
||
ret
==
WN_BAD_VALUE
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
else
ok
(
ret
==
WN_NOT_CONNECTED
||
ret
==
WN_BAD_VALUE
,
"(%s) WNetGetUniversalNameA gave wrong error: %u
\n
"
,
driveA
,
ret
);
"(%s) WNetGetUniversalNameA gave wrong error: %
l
u
\n
"
,
driveA
,
ret
);
fail_size
=
ARRAY_SIZE
(
driveA
)
-
1
;
ret
=
WNetGetUniversalNameA
(
driveA
,
REMOTE_NAME_INFO_LEVEL
,
buffer
,
&
fail_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
todo_wine
ok
(
ret
==
WN_MORE_DATA
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
todo_wine
ok
(
ret
==
WN_MORE_DATA
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
ret
=
WNetGetUniversalNameA
(
driveandpathA
,
REMOTE_NAME_INFO_LEVEL
,
buffer
,
&
info_size
);
if
(
drive_type
==
DRIVE_REMOTE
)
todo_wine
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08x
\n
"
,
ret
);
todo_wine
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameA failed: %08
l
x
\n
"
,
ret
);
info_size
=
sizeof
(
buffer
);
ret
=
WNetGetUniversalNameW
(
driveW
,
REMOTE_NAME_INFO_LEVEL
,
buffer
,
&
info_size
);
todo_wine
{
if
(
drive_type
==
DRIVE_REMOTE
)
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameW failed: %08x
\n
"
,
ret
);
ok
(
ret
==
WN_NO_ERROR
,
"WNetGetUniversalNameW failed: %08
l
x
\n
"
,
ret
);
else
ok
(
ret
==
WN_NOT_CONNECTED
||
ret
==
WN_NO_NET_OR_BAD_PATH
,
"(%s) WNetGetUniversalNameW gave wrong error: %u
\n
"
,
driveA
,
ret
);
"(%s) WNetGetUniversalNameW gave wrong error: %
l
u
\n
"
,
driveA
,
ret
);
}
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %u
\n
"
,
info_size
);
ok
(
info_size
==
sizeof
(
buffer
),
"Got wrong size: %
l
u
\n
"
,
info_size
);
}
}
...
...
@@ -191,7 +191,7 @@ static BOOL CALLBACK enum_password_proc(PASSWORD_CACHE_ENTRY* pce, DWORD param)
WORD
size
=
0
;
char
*
buf
;
ok
(
param
==
m_param
,
"param, got %
d, got %
d
\n
"
,
param
,
m_param
);
ok
(
param
==
m_param
,
"param, got %
ld, got %l
d
\n
"
,
param
,
m_param
);
size
=
offsetof
(
PASSWORD_CACHE_ENTRY
,
abResource
[
pce
->
cbResource
+
pce
->
cbPassword
]
);
ok
(
pce
->
cbEntry
==
size
,
"cbEntry, got %d, expected %d
\n
"
,
pce
->
cbEntry
,
size
);
...
...
@@ -232,14 +232,14 @@ static void test_WNetCachePassword(void)
strcpy
(
password_buf
,
m_password
);
password_len
=
strlen
(
m_password
);
ret
=
pWNetCachePassword
(
resource_buf
,
resource_len
,
password_buf
,
password_len
,
m_type
,
0
);
ok
(
ret
==
WN_SUCCESS
,
"WNetCachePassword failed: got %d, expected %d
\n
"
,
ret
,
WN_SUCCESS
);
ok
(
ret
==
WN_SUCCESS
,
"WNetCachePassword failed: got %
l
d, expected %d
\n
"
,
ret
,
WN_SUCCESS
);
strcpy
(
resource_buf
,
m_resource
);
resource_len
=
strlen
(
m_resource
);
strcpy
(
password_buf
,
"------"
);
password_len
=
sizeof
(
password_buf
);
ret
=
pWNetGetCachedPassword
(
resource_buf
,
resource_len
,
password_buf
,
&
password_len
,
m_type
);
ok
(
ret
==
WN_SUCCESS
,
"WNetGetCachedPassword failed: got %d, expected %d
\n
"
,
ret
,
WN_SUCCESS
);
ok
(
ret
==
WN_SUCCESS
,
"WNetGetCachedPassword failed: got %
l
d, expected %d
\n
"
,
ret
,
WN_SUCCESS
);
ok
(
password_len
==
strlen
(
m_password
),
"password length different, got %d
\n
"
,
password_len
);
ok
(
strncmp
(
password_buf
,
m_password
,
password_len
)
==
0
,
"passwords different, got %.*s, expected %s
\n
"
,
password_len
,
password_buf
,
m_password
);
...
...
@@ -247,13 +247,13 @@ static void test_WNetCachePassword(void)
strcpy
(
prefix_buf
,
m_resource
);
prefix_buf
[
prefix_len
]
=
'0'
;
ret
=
pWNetEnumCachedPasswords
(
prefix_buf
,
prefix_len
,
m_type
,
enum_password_proc
,
m_param
);
ok
(
ret
==
WN_SUCCESS
,
"WNetEnumCachedPasswords failed: got %d, expected %d
\n
"
,
ret
,
WN_SUCCESS
);
ok
(
ret
==
WN_SUCCESS
,
"WNetEnumCachedPasswords failed: got %
l
d, expected %d
\n
"
,
ret
,
WN_SUCCESS
);
ok
(
m_callback_reached
==
1
,
"callback was not reached
\n
"
);
strcpy
(
resource_buf
,
m_resource
);
resource_len
=
strlen
(
m_resource
);
ret
=
pWNetRemoveCachedPassword
(
resource_buf
,
resource_len
,
m_type
);
ok
(
ret
==
WN_SUCCESS
,
"WNetRemoveCachedPassword failed: got %d, expected %d
\n
"
,
ret
,
WN_SUCCESS
);
ok
(
ret
==
WN_SUCCESS
,
"WNetRemoveCachedPassword failed: got %
l
d, expected %d
\n
"
,
ret
,
WN_SUCCESS
);
}
else
{
win_skip
(
"WNetCachePassword() is not supported.
\n
"
);
}
...
...
@@ -287,28 +287,28 @@ static void test_WNetUseConnection(void)
if
(
ret
!=
ERROR_ALREADY_ASSIGNED
)
break
;
}
if
(
ret
==
ERROR_ALREADY_ASSIGNED
)
goto
end
;
/* no drives available */
todo_wine
ok
(
ret
==
WN_SUCCESS
,
"Unexpected return: %u
\n
"
,
ret
);
ok
(
bufSize
==
0
,
"Unexpected buffer size: %u
\n
"
,
bufSize
);
todo_wine
ok
(
ret
==
WN_SUCCESS
,
"Unexpected return: %
l
u
\n
"
,
ret
);
ok
(
bufSize
==
0
,
"Unexpected buffer size: %
l
u
\n
"
,
bufSize
);
if
(
ret
==
WN_SUCCESS
)
WNetCancelConnectionA
(
drive
,
TRUE
);
bufSize
=
0
;
ret
=
pWNetUseConnectionA
(
NULL
,
netRes
,
NULL
,
NULL
,
0
,
outBuf
,
&
bufSize
,
&
outRes
);
todo_wine
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Unexpected return: %u
\n
"
,
ret
);
ok
(
bufSize
==
0
,
"Unexpected buffer size: %u
\n
"
,
bufSize
);
todo_wine
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Unexpected return: %
l
u
\n
"
,
ret
);
ok
(
bufSize
==
0
,
"Unexpected buffer size: %
l
u
\n
"
,
bufSize
);
if
(
ret
==
WN_SUCCESS
)
WNetCancelConnectionA
(
drive
,
TRUE
);
todo_wine
{
bufSize
=
1
;
ret
=
pWNetUseConnectionA
(
NULL
,
netRes
,
NULL
,
NULL
,
0
,
outBuf
,
&
bufSize
,
&
outRes
);
ok
(
ret
==
ERROR_MORE_DATA
,
"Unexpected return: %u
\n
"
,
ret
);
ok
(
bufSize
==
3
,
"Unexpected buffer size: %u
\n
"
,
bufSize
);
ok
(
ret
==
ERROR_MORE_DATA
,
"Unexpected return: %
l
u
\n
"
,
ret
);
ok
(
bufSize
==
3
,
"Unexpected buffer size: %
l
u
\n
"
,
bufSize
);
if
(
ret
==
WN_SUCCESS
)
WNetCancelConnectionA
(
drive
,
TRUE
);
bufSize
=
4
;
ret
=
pWNetUseConnectionA
(
NULL
,
netRes
,
NULL
,
NULL
,
0
,
outBuf
,
&
bufSize
,
&
outRes
);
ok
(
ret
==
WN_SUCCESS
,
"Unexpected return: %u
\n
"
,
ret
);
ok
(
ret
==
WN_SUCCESS
,
"Unexpected return: %
l
u
\n
"
,
ret
);
}
ok
(
bufSize
==
4
,
"Unexpected buffer size: %u
\n
"
,
bufSize
);
ok
(
bufSize
==
4
,
"Unexpected buffer size: %
l
u
\n
"
,
bufSize
);
if
(
ret
==
WN_SUCCESS
)
WNetCancelConnectionA
(
drive
,
TRUE
);
end:
...
...
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