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
126cf256
Commit
126cf256
authored
Dec 18, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Add PropVariantCopy() test for BSTR with embedded null.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
adcb5f98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
propvariant.c
dlls/ole32/tests/propvariant.c
+13
-0
No files found.
dlls/ole32/tests/propvariant.c
View file @
126cf256
...
...
@@ -367,6 +367,19 @@ static void test_copy(void)
hr
=
PropVariantClear
(
&
propvarDst
);
ok
(
hr
==
S_OK
,
"PropVariantClear(...VT_BSTR...) failed
\n
"
);
/* BSTR with embedded null */
propvarSrc
.
vt
=
VT_BSTR
;
U
(
propvarSrc
).
bstrVal
=
SysAllocStringLen
(
L"Test Str
\0
ing"
,
12
);
hr
=
PropVariantCopy
(
&
propvarDst
,
&
propvarSrc
);
ok
(
hr
==
S_OK
,
"Failed to copy propvar, hr %#x.
\n
"
,
hr
);
ok
(
SysStringLen
(
U
(
propvarDst
).
bstrVal
)
==
8
,
"Unexpected copy length.
\n
"
);
ok
(
SysStringLen
(
U
(
propvarSrc
).
bstrVal
)
==
12
,
"Unexpected source length.
\n
"
);
ok
(
!
lstrcmpW
(
U
(
propvarSrc
).
bstrVal
,
U
(
propvarDst
).
bstrVal
),
"BSTR not copied properly
\n
"
);
hr
=
PropVariantClear
(
&
propvarSrc
);
ok
(
hr
==
S_OK
,
"Failed to clear propvar, hr %#x.
\n
"
,
hr
);
hr
=
PropVariantClear
(
&
propvarDst
);
ok
(
hr
==
S_OK
,
"Failed to clear propvar, hr %#x.
\n
"
,
hr
);
propvarSrc
.
vt
=
VT_LPWSTR
;
U
(
propvarSrc
).
pwszVal
=
wszTestString
;
hr
=
PropVariantCopy
(
&
propvarDst
,
&
propvarSrc
);
...
...
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