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
e9e7301b
Commit
e9e7301b
authored
Jul 21, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Use nameless unions/structs.
parent
3d52c87d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
27 deletions
+26
-27
misc.c
dlls/urlmon/tests/misc.c
+0
-0
protocol.c
dlls/urlmon/tests/protocol.c
+2
-2
stream.c
dlls/urlmon/tests/stream.c
+3
-3
uri.c
dlls/urlmon/tests/uri.c
+9
-9
url.c
dlls/urlmon/tests/url.c
+12
-13
No files found.
dlls/urlmon/tests/misc.c
View file @
e9e7301b
This diff is collapsed.
Click to expand it.
dlls/urlmon/tests/protocol.c
View file @
e9e7301b
...
...
@@ -1448,9 +1448,9 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
/* Must be GMEM_FIXED, GMEM_MOVABLE does not work properly */
data
=
GlobalAlloc
(
GPTR
,
sizeof
(
post_data
));
memcpy
(
data
,
post_data
,
sizeof
(
post_data
));
U
(
pbindinfo
->
stgmedData
)
.
hGlobal
=
data
;
pbindinfo
->
stgmedData
.
hGlobal
=
data
;
}
else
{
U
(
pbindinfo
->
stgmedData
)
.
pstm
=
&
Stream
;
pbindinfo
->
stgmedData
.
pstm
=
&
Stream
;
}
}
...
...
dlls/urlmon/tests/stream.c
View file @
e9e7301b
...
...
@@ -224,13 +224,13 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR
ok
(
pstgmed
!=
NULL
,
"stgmeg == NULL
\n
"
);
if
(
pstgmed
)
{
ok
(
pstgmed
->
tymed
==
TYMED_ISTREAM
,
"tymed=%lu
\n
"
,
pstgmed
->
tymed
);
ok
(
U
(
*
pstgmed
).
pstm
!=
NULL
,
"pstm == NULL
\n
"
);
ok
(
pstgmed
->
pstm
!=
NULL
,
"pstm == NULL
\n
"
);
ok
(
pstgmed
->
pUnkForRelease
!=
NULL
,
"pUnkForRelease == NULL
\n
"
);
}
}
if
(
U
(
*
pstgmed
).
pstm
)
{
do
hres
=
IStream_Read
(
U
(
*
pstgmed
).
pstm
,
buf
,
512
,
&
read
);
if
(
pstgmed
->
pstm
)
{
do
hres
=
IStream_Read
(
pstgmed
->
pstm
,
buf
,
512
,
&
read
);
while
(
hres
==
S_OK
);
ok
(
hres
==
S_FALSE
||
hres
==
E_PENDING
,
"IStream_Read returned %08lx
\n
"
,
hres
);
}
...
...
dlls/urlmon/tests/uri.c
View file @
e9e7301b
...
...
@@ -11433,14 +11433,14 @@ static void test_IPersistStream(void)
ok
(
hr
==
S_OK
,
"%d) Seek failed 0x%08lx, expected S_OK.
\n
"
,
i
,
hr
);
hr
=
IPersistStream_GetSizeMax
(
persist_stream
,
&
max_size
);
ok
(
hr
==
S_OK
,
"%d) GetSizeMax failed 0x%08lx, expected S_OK.
\n
"
,
i
,
hr
);
ok
(
U
(
size
).
LowPart
+
2
==
U
(
max_size
)
.
LowPart
,
ok
(
size
.
LowPart
+
2
==
max_size
.
LowPart
,
"%d) Written data size is %ld, max_size %ld.
\n
"
,
i
,
U
(
size
).
LowPart
,
U
(
max_size
)
.
LowPart
);
i
,
size
.
LowPart
,
max_size
.
LowPart
);
hr
=
IStream_Read
(
stream
,
(
void
*
)
dw_data
,
sizeof
(
DWORD
),
NULL
);
ok
(
hr
==
S_OK
,
"%d) Read failed 0x%08lx, expected S_OK.
\n
"
,
i
,
hr
);
ok
(
dw_data
[
0
]
-
2
==
U
(
size
)
.
LowPart
,
"%d) Structure size is %ld, expected %ld
\n
"
,
i
,
dw_data
[
0
]
-
2
,
U
(
size
)
.
LowPart
);
ok
(
dw_data
[
0
]
-
2
==
size
.
LowPart
,
"%d) Structure size is %ld, expected %ld
\n
"
,
i
,
dw_data
[
0
]
-
2
,
size
.
LowPart
);
hr
=
IStream_Read
(
stream
,
(
void
*
)
dw_data
,
6
*
sizeof
(
DWORD
),
NULL
);
ok
(
hr
==
S_OK
,
"%d) Read failed 0x%08lx, expected S_OK.
\n
"
,
i
,
hr
);
ok
(
dw_data
[
0
]
==
0
,
"%d) Incorrect value %lx, expected 0 (unknown).
\n
"
,
i
,
dw_data
[
0
]);
...
...
@@ -11568,8 +11568,8 @@ static void test_IPersistStream(void)
ok
(
hr
==
S_OK
,
"%d) Seek failed 0x%08lx, expected S_OK.
\n
"
,
i
,
hr
);
hr
=
IStream_Read
(
stream
,
(
void
*
)
dw_data
,
3
*
sizeof
(
DWORD
),
NULL
);
ok
(
hr
==
S_OK
,
"%d) Read failed 0x%08lx, expected S_OK.
\n
"
,
i
,
hr
);
ok
(
dw_data
[
0
]
-
2
==
U
(
size
)
.
LowPart
,
"%d) Structure size is %ld, expected %ld
\n
"
,
i
,
dw_data
[
0
]
-
2
,
U
(
size
)
.
LowPart
);
ok
(
dw_data
[
0
]
-
2
==
size
.
LowPart
,
"%d) Structure size is %ld, expected %ld
\n
"
,
i
,
dw_data
[
0
]
-
2
,
size
.
LowPart
);
ok
(
dw_data
[
1
]
==
MSHCTX_LOCAL
,
"%d) Incorrect value %ld, expected MSHCTX_LOCAL.
\n
"
,
i
,
dw_data
[
1
]);
ok
(
dw_data
[
2
]
==
dw_data
[
0
]
-
8
,
"%d) Incorrect value %ld, expected %ld (PersistStream size).
\n
"
,
...
...
@@ -11578,9 +11578,9 @@ static void test_IPersistStream(void)
(
test
->
dword_props
[
Uri_PROPERTY_SCHEME
-
Uri_PROPERTY_DWORD_START
].
value
==
URL_SCHEME_HTTP
||
test
->
dword_props
[
Uri_PROPERTY_SCHEME
-
Uri_PROPERTY_DWORD_START
].
value
==
URL_SCHEME_FTP
||
test
->
dword_props
[
Uri_PROPERTY_SCHEME
-
Uri_PROPERTY_DWORD_START
].
value
==
URL_SCHEME_HTTPS
))
U
(
max_size
)
.
LowPart
+=
3
*
sizeof
(
DWORD
);
ok
(
dw_data
[
2
]
==
U
(
max_size
)
.
LowPart
,
"%d) Incorrect value %ld, expected %ld (PersistStream size).
\n
"
,
i
,
dw_data
[
2
],
U
(
max_size
)
.
LowPart
);
max_size
.
LowPart
+=
3
*
sizeof
(
DWORD
);
ok
(
dw_data
[
2
]
==
max_size
.
LowPart
,
"%d) Incorrect value %ld, expected %ld (PersistStream size).
\n
"
,
i
,
dw_data
[
2
],
max_size
.
LowPart
);
IMarshal_Release
(
marshal
);
IUri_Release
(
uri
);
...
...
dlls/urlmon/tests/url.c
View file @
e9e7301b
...
...
@@ -23,7 +23,6 @@
#include <stdio.h>
#define COBJMACROS
#define NONAMELESSUNION
#define CONST_VTABLE
#include "windef.h"
...
...
@@ -1998,9 +1997,9 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
switch
(
pstgmed
->
tymed
)
{
case
TYMED_ISTREAM
:
{
IStream
*
stream
=
U
(
*
pstgmed
).
pstm
;
IStream
*
stream
=
pstgmed
->
pstm
;
ok
(
stream
!=
NULL
,
"
U(*pstgmed).
pstm == NULL
\n
"
);
ok
(
stream
!=
NULL
,
"
pstgmed->
pstm == NULL
\n
"
);
if
(
grfBSCF
&
BSCF_FIRSTDATANOTIFICATION
)
{
STATSTG
stat
;
...
...
@@ -2024,8 +2023,8 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
"stat.pwcsName = %s, cache_file_name = %s
\n
"
,
wine_dbgstr_w
(
stat
.
pwcsName
),
wine_dbgstr_w
(
cache_file_name
));
CoTaskMemFree
(
stat
.
pwcsName
);
ok
(
U
(
stat
.
cbSize
)
.
LowPart
==
(
bindf
&
BINDF_ASYNCHRONOUS
?
0
:
6500
),
"stat.cbSize.LowPart = %lu
\n
"
,
U
(
stat
.
cbSize
)
.
LowPart
);
ok
(
stat
.
cbSize
.
LowPart
==
(
bindf
&
BINDF_ASYNCHRONOUS
?
0
:
6500
),
"stat.cbSize.LowPart = %lu
\n
"
,
stat
.
cbSize
.
LowPart
);
}
else
{
hres
=
IStream_Stat
(
stream
,
&
stat
,
STATFLAG_NONAME
);
ok
(
hres
==
S_OK
,
"hres = %lx
\n
"
,
hres
);
...
...
@@ -2033,8 +2032,8 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
"stat.pwcsName = %s
\n
"
,
wine_dbgstr_w
(
stat
.
pwcsName
));
}
ok
(
stat
.
type
==
STGTY_STREAM
,
"stat.type = %lx
\n
"
,
stat
.
type
);
ok
(
U
(
stat
.
cbSize
)
.
HighPart
==
0
,
"stat.cbSize.HighPart != 0
\n
"
);
ok
(
stat
.
grfMode
==
(
U
(
stat
.
cbSize
)
.
LowPart
?
GENERIC_READ
:
0
),
"stat.grfMode = %lx
\n
"
,
stat
.
grfMode
);
ok
(
stat
.
cbSize
.
HighPart
==
0
,
"stat.cbSize.HighPart != 0
\n
"
);
ok
(
stat
.
grfMode
==
(
stat
.
cbSize
.
LowPart
?
GENERIC_READ
:
0
),
"stat.grfMode = %lx
\n
"
,
stat
.
grfMode
);
ok
(
stat
.
grfLocksSupported
==
0
,
"stat.grfLocksSupported = %lx
\n
"
,
stat
.
grfLocksSupported
);
ok
(
stat
.
grfStateBits
==
0
,
"stat.grfStateBits = %lx
\n
"
,
stat
.
grfStateBits
);
ok
(
stat
.
reserved
==
0
,
"stat.reserved = %lx
\n
"
,
stat
.
reserved
);
...
...
@@ -2055,15 +2054,15 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
}
case
TYMED_FILE
:
if
(
test_protocol
==
FILE_TEST
)
ok
(
!
lstrcmpW
(
pstgmed
->
u
.
lpszFileName
,
file_url
+
7
),
"unexpected file name %s
\n
"
,
wine_dbgstr_w
(
pstgmed
->
u
.
lpszFileName
));
ok
(
!
lstrcmpW
(
pstgmed
->
lpszFileName
,
file_url
+
7
),
"unexpected file name %s
\n
"
,
wine_dbgstr_w
(
pstgmed
->
lpszFileName
));
else
if
(
emulate_protocol
)
ok
(
!
lstrcmpW
(
pstgmed
->
u
.
lpszFileName
,
cache_fileW
),
"unexpected file name %s
\n
"
,
wine_dbgstr_w
(
pstgmed
->
u
.
lpszFileName
));
ok
(
!
lstrcmpW
(
pstgmed
->
lpszFileName
,
cache_fileW
),
"unexpected file name %s
\n
"
,
wine_dbgstr_w
(
pstgmed
->
lpszFileName
));
else
if
(
test_protocol
==
HTTP_TEST
)
lstrcpyW
(
http_cache_file
,
pstgmed
->
u
.
lpszFileName
);
lstrcpyW
(
http_cache_file
,
pstgmed
->
lpszFileName
);
else
ok
(
pstgmed
->
u
.
lpszFileName
!=
NULL
,
"lpszFileName == NULL
\n
"
);
ok
(
pstgmed
->
lpszFileName
!=
NULL
,
"lpszFileName == NULL
\n
"
);
}
if
((
test_protocol
==
HTTP_TEST
||
test_protocol
==
HTTPS_TEST
||
test_protocol
==
WINETEST_TEST
)
...
...
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