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
7198499d
Commit
7198499d
authored
Jul 24, 2018
by
Daniel Lehman
Committed by
Alexandre Julliard
Aug 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Add test for VarBstrFromI4.
Signed-off-by:
Daniel Lehman
<
dlehman@esri.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32c6e823
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
vartype.c
dlls/oleaut32/tests/vartype.c
+31
-0
No files found.
dlls/oleaut32/tests/vartype.c
View file @
7198499d
...
...
@@ -4540,6 +4540,36 @@ static void test_VarBoolChangeTypeEx(void)
* BSTR
*/
static
void
test_VarBstrFromI4
(
void
)
{
static
const
WCHAR
int_min
[]
=
{
'-'
,
'2'
,
'1'
,
'4'
,
'7'
,
'4'
,
'8'
,
'3'
,
'6'
,
'4'
,
'8'
,
'\0'
};
static
const
WCHAR
minus_42
[]
=
{
'-'
,
'4'
,
'2'
,
'\0'
};
BSTR
bstr
=
NULL
;
HRESULT
hres
;
LONG
value
;
LCID
lcid
;
lcid
=
MAKELCID
(
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
SORT_DEFAULT
);
value
=
-
2147483648
;
hres
=
VarBstrFromI4
(
value
,
lcid
,
LOCALE_NOUSEROVERRIDE
,
&
bstr
);
ok
(
hres
==
S_OK
,
"got hres 0x%08x
\n
"
,
hres
);
if
(
bstr
)
{
todo_wine
ok
(
memcmp
(
bstr
,
int_min
,
sizeof
(
int_min
))
==
0
,
"string different
\n
"
);
SysFreeString
(
bstr
);
}
value
=
-
42
;
hres
=
VarBstrFromI4
(
value
,
lcid
,
LOCALE_NOUSEROVERRIDE
,
&
bstr
);
ok
(
hres
==
S_OK
,
"got hres 0x%08x
\n
"
,
hres
);
if
(
bstr
)
{
ok
(
memcmp
(
bstr
,
minus_42
,
sizeof
(
minus_42
))
==
0
,
"string different
\n
"
);
SysFreeString
(
bstr
);
}
}
static
void
test_VarBstrFromR4
(
void
)
{
static
const
WCHAR
szNative
[]
=
{
'6'
,
'5'
,
'4'
,
'3'
,
'2'
,
'2'
,
'.'
,
'3'
,
'\0'
};
...
...
@@ -6347,6 +6377,7 @@ START_TEST(vartype)
test_VarBoolCopy
();
test_VarBoolChangeTypeEx
();
test_VarBstrFromI4
();
test_VarBstrFromR4
();
test_VarBstrFromDate
();
test_VarBstrFromCy
();
...
...
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