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
3d52c87d
Commit
3d52c87d
authored
Jul 21, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Use nameless unions/structs.
parent
a345f985
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
istream.c
dlls/shlwapi/tests/istream.c
+9
-9
string.c
dlls/shlwapi/tests/string.c
+7
-7
No files found.
dlls/shlwapi/tests/istream.c
View file @
3d52c87d
...
...
@@ -39,12 +39,12 @@ static void test_IStream_invalid_operations(IStream * stream, DWORD mode)
ULONG
count
;
char
data
[
256
];
U
(
uzero
)
.
HighPart
=
0
;
U
(
uzero
)
.
LowPart
=
0
;
U
(
uret
)
.
HighPart
=
0
;
U
(
uret
)
.
LowPart
=
0
;
U
(
zero
)
.
HighPart
=
0
;
U
(
zero
)
.
LowPart
=
0
;
uzero
.
HighPart
=
0
;
uzero
.
LowPart
=
0
;
uret
.
HighPart
=
0
;
uret
.
LowPart
=
0
;
zero
.
HighPart
=
0
;
zero
.
LowPart
=
0
;
/* IStream::Read */
...
...
@@ -707,7 +707,7 @@ static void test_SHCreateStreamOnFileEx_CopyTo(void)
ok
(
SUCCEEDED
(
ret
),
"SHCreateStreamOnFileEx failed with ret=0x%08lx
\n
"
,
ret
);
written
.
QuadPart
=
0
;
ret
=
IStream_Write
(
src
,
srcContents
,
sizeof
(
srcContents
),
&
U
(
written
)
.
LowPart
);
ret
=
IStream_Write
(
src
,
srcContents
,
sizeof
(
srcContents
),
&
written
.
LowPart
);
ok
(
SUCCEEDED
(
ret
),
"ISequentialStream_Write failed with ret=0x%08lx
\n
"
,
ret
);
distance
.
QuadPart
=
0
;
...
...
@@ -723,8 +723,8 @@ static void test_SHCreateStreamOnFileEx_CopyTo(void)
ret
=
IStream_CopyTo
(
src
,
dst
,
count
,
&
read
,
&
written
);
ok
(
SUCCEEDED
(
ret
),
"CopyTo failed with ret=0x%08lx
\n
"
,
ret
);
ok
(
read
.
QuadPart
==
1
,
"read does not match size: %ld != 1
\n
"
,
U
(
read
)
.
LowPart
);
ok
(
written
.
QuadPart
==
1
,
"written does not match size: %ld != 1
\n
"
,
U
(
written
)
.
LowPart
);
ok
(
read
.
QuadPart
==
1
,
"read does not match size: %ld != 1
\n
"
,
read
.
LowPart
);
ok
(
written
.
QuadPart
==
1
,
"written does not match size: %ld != 1
\n
"
,
written
.
LowPart
);
IStream_Release
(
dst
);
IStream_Release
(
src
);
...
...
dlls/shlwapi/tests/string.c
View file @
3d52c87d
...
...
@@ -896,7 +896,7 @@ static void test_StrRetToBSTR(void)
}
strret
.
uType
=
STRRET_WSTR
;
U
(
strret
)
.
pOleStr
=
CoDupStrW
(
"Test"
);
strret
.
pOleStr
=
CoDupStrW
(
"Test"
);
bstr
=
0
;
ret
=
pStrRetToBSTR
(
&
strret
,
NULL
,
&
bstr
);
ok
(
ret
==
S_OK
&&
bstr
&&
!
wcscmp
(
bstr
,
szTestW
),
...
...
@@ -904,14 +904,14 @@ static void test_StrRetToBSTR(void)
SysFreeString
(
bstr
);
strret
.
uType
=
STRRET_CSTR
;
lstrcpyA
(
U
(
strret
)
.
cStr
,
"Test"
);
lstrcpyA
(
strret
.
cStr
,
"Test"
);
ret
=
pStrRetToBSTR
(
&
strret
,
NULL
,
&
bstr
);
ok
(
ret
==
S_OK
&&
bstr
&&
!
wcscmp
(
bstr
,
szTestW
),
"STRRET_CSTR: dup failed, ret=0x%08lx, bstr %p
\n
"
,
ret
,
bstr
);
SysFreeString
(
bstr
);
strret
.
uType
=
STRRET_OFFSET
;
U
(
strret
)
.
uOffset
=
1
;
strret
.
uOffset
=
1
;
strcpy
((
char
*
)
&
iidl
,
" Test"
);
ret
=
pStrRetToBSTR
(
&
strret
,
iidl
,
&
bstr
);
ok
(
ret
==
S_OK
&&
bstr
&&
!
wcscmp
(
bstr
,
szTestW
),
...
...
@@ -1128,7 +1128,7 @@ if (0)
{
memset
(
wbuf
,
0xbf
,
sizeof
(
wbuf
));
strret
.
uType
=
STRRET_WSTR
;
U
(
strret
)
.
pOleStr
=
StrDupW
(
wstr1
);
strret
.
pOleStr
=
StrDupW
(
wstr1
);
hres
=
pStrRetToBufW
(
&
strret
,
NULL
,
wbuf
,
10
);
ok
(
hres
==
E_NOT_SUFFICIENT_BUFFER
||
broken
(
hres
==
S_OK
)
/* winxp */
,
"StrRetToBufW returned %08lx
\n
"
,
hres
);
...
...
@@ -1139,14 +1139,14 @@ if (0)
memset
(
wbuf
,
0xbf
,
sizeof
(
wbuf
));
strret
.
uType
=
STRRET_CSTR
;
StrCpyNA
(
U
(
strret
)
.
cStr
,
str1
,
MAX_PATH
);
StrCpyNA
(
strret
.
cStr
,
str1
,
MAX_PATH
);
hres
=
pStrRetToBufW
(
&
strret
,
NULL
,
wbuf
,
10
);
ok
(
hres
==
S_OK
,
"StrRetToBufW returned %08lx
\n
"
,
hres
);
ok
(
!
memcmp
(
wbuf
,
wstr1
,
9
*
sizeof
(
WCHAR
))
&&
!
wbuf
[
9
],
"StrRetToBuf returned %s
\n
"
,
wine_dbgstr_w
(
wbuf
));
memset
(
wbuf
,
0xbf
,
sizeof
(
wbuf
));
strret
.
uType
=
STRRET_WSTR
;
U
(
strret
)
.
pOleStr
=
NULL
;
strret
.
pOleStr
=
NULL
;
hres
=
pStrRetToBufW
(
&
strret
,
NULL
,
wbuf
,
10
);
ok
(
hres
==
E_FAIL
,
"StrRetToBufW returned %08lx
\n
"
,
hres
);
ok
(
!
wbuf
[
0
],
"StrRetToBuf returned %s
\n
"
,
wine_dbgstr_w
(
wbuf
));
...
...
@@ -1158,7 +1158,7 @@ if (0)
{
memset
(
buf
,
0xbf
,
sizeof
(
buf
));
strret
.
uType
=
STRRET_CSTR
;
StrCpyNA
(
U
(
strret
)
.
cStr
,
str1
,
MAX_PATH
);
StrCpyNA
(
strret
.
cStr
,
str1
,
MAX_PATH
);
expect_eq2
(
pStrRetToBufA
(
&
strret
,
NULL
,
buf
,
10
),
S_OK
,
E_NOT_SUFFICIENT_BUFFER
/* Vista */
,
HRESULT
,
"%lx"
);
expect_eq
(
buf
[
9
],
0
,
CHAR
,
"%x"
);
expect_eq
(
buf
[
10
],
(
CHAR
)
0xbf
,
CHAR
,
"%x"
);
...
...
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