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
e5b2c146
Commit
e5b2c146
authored
Mar 05, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Mar 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut: Add some more VarFormat tests and fix the VarMod decimal test.
parent
08764dde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
vartest.c
dlls/oleaut32/tests/vartest.c
+30
-1
No files found.
dlls/oleaut32/tests/vartest.c
View file @
e5b2c146
...
...
@@ -1731,6 +1731,9 @@ static void test_VarFormat(void)
VARFMT
(
VT_I4
,
V_I4
,
1
,
"000###"
,
S_OK
,
"000001"
);
VARFMT
(
VT_I4
,
V_I4
,
1
,
"#00##00#0"
,
S_OK
,
"00000001"
);
VARFMT
(
VT_I4
,
V_I4
,
1
,
"1#####0000"
,
S_OK
,
"10001"
);
todo_wine
{
VARFMT
(
VT_I4
,
V_I4
,
100000
,
"#,###,###,###"
,
S_OK
,
"100,000"
);
}
VARFMT
(
VT_R8
,
V_R8
,
1
.
23456789
,
"0#.0#0#0#0#0"
,
S_OK
,
"01.234567890"
);
VARFMT
(
VT_R8
,
V_R8
,
1
.
2
,
"0#.0#0#0#0#0"
,
S_OK
,
"01.200000000"
);
VARFMT
(
VT_R8
,
V_R8
,
9
.
87654321
,
"#0.#0#0#0#0#"
,
S_OK
,
"9.87654321"
);
...
...
@@ -1779,6 +1782,14 @@ static void test_VarFormat(void)
pVarFormat
(
&
in
,
NULL
,
fd
,
fw
,
flags
,
&
out
);
/* Would crash if out is cleared */
out
=
NULL
;
/* VT_NULL */
V_VT
(
&
in
)
=
VT_NULL
;
hres
=
pVarFormat
(
&
in
,
NULL
,
fd
,
fw
,
0
,
&
out
);
todo_wine
{
ok
(
hres
==
S_OK
,
"VarFormat failed with 0x%08lx
\n
"
,
hres
);
ok
(
out
==
NULL
,
"expected NULL formatted string
\n
"
);
}
/* Invalid args */
hres
=
pVarFormat
(
&
in
,
NULL
,
fd
,
fw
,
flags
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"Null out: expected E_INVALIDARG, got 0x%08lx
\n
"
,
hres
);
...
...
@@ -2450,6 +2461,25 @@ static void test_VarMod(void)
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
VT_I4
&&
V_I4
(
&
vDst
)
==
0
,
"VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld
\n
"
,
S_OK
,
VT_I4
,
0
,
hres
,
V_VT
(
&
vDst
),
V_I4
(
&
vDst
));
/* some decimals */
todo_wine
{
V_VT
(
&
v1
)
=
VT_DECIMAL
;
V_VT
(
&
v2
)
=
VT_DECIMAL
;
VarDecFromI4
(
100
,
&
V_DECIMAL
(
&
v1
));
VarDecFromI4
(
10
,
&
V_DECIMAL
(
&
v2
));
hres
=
pVarMod
(
&
v1
,
&
v2
,
&
vDst
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
VT_I4
&&
V_I4
(
&
vDst
)
==
0
,
"VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld
\n
"
,
S_OK
,
VT_I4
,
0
,
hres
,
V_VT
(
&
vDst
),
V_I4
(
&
vDst
));
V_VT
(
&
v1
)
=
VT_I4
;
V_VT
(
&
v2
)
=
VT_DECIMAL
;
V_I4
(
&
v1
)
=
100
;
VarDecFromI4
(
10
,
&
V_DECIMAL
(
&
v2
));
hres
=
pVarMod
(
&
v1
,
&
v2
,
&
vDst
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
VT_I4
&&
V_I4
(
&
vDst
)
==
0
,
"VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld
\n
"
,
S_OK
,
VT_I4
,
0
,
hres
,
V_VT
(
&
vDst
),
V_I4
(
&
vDst
));
}
VARMOD2
(
UINT
,
I4
,
100
,
10
,
I4
,
0
,
S_OK
);
/* test that an error results in the type of the result changing but not its value */
...
...
@@ -2473,7 +2503,6 @@ static void test_VarMod(void)
VARMOD2
(
ERROR
,
I4
,
100
,
10
,
EMPTY
,
0
,
DISP_E_TYPEMISMATCH
);
VARMOD2
(
VARIANT
,
I4
,
100
,
10
,
EMPTY
,
0
,
DISP_E_TYPEMISMATCH
);
VARMOD2
(
UNKNOWN
,
I4
,
100
,
10
,
EMPTY
,
0
,
DISP_E_TYPEMISMATCH
);
VARMOD2
(
DECIMAL
,
I4
,
100
,
10
,
EMPTY
,
0
,
DISP_E_OVERFLOW
);
VARMOD2
(
VOID
,
I4
,
100
,
10
,
EMPTY
,
0
,
DISP_E_BADVARTYPE
);
VARMOD2
(
HRESULT
,
I4
,
100
,
10
,
EMPTY
,
0
,
DISP_E_BADVARTYPE
);
VARMOD2
(
PTR
,
I4
,
100
,
10
,
EMPTY
,
0
,
DISP_E_BADVARTYPE
);
...
...
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