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
3af4ebf2
Commit
3af4ebf2
authored
Feb 12, 2019
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Floating point numeric constants are by default doubles.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d5068822
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
vartest.c
dlls/oleaut32/tests/vartest.c
+12
-16
No files found.
dlls/oleaut32/tests/vartest.c
View file @
3af4ebf2
...
...
@@ -2715,8 +2715,7 @@ static void test_VarSub(void)
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_CY
,
"VarSub: expected coerced type VT_CY, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromCy
(
V_CY
(
&
result
),
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
4702
.
0
),
"VarSub: CY value %f, expected %f
\n
"
,
r
,
(
double
)
4720
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
4702
.
0
),
"VarSub: CY value %f, expected %f
\n
"
,
r
,
4720
.
0
);
hres
=
pVarSub
(
&
left
,
&
dec
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_DECIMAL
,
...
...
@@ -5533,12 +5532,12 @@ static void test_VarMul(void)
hres
=
pVarMul
(
&
cy
,
&
right
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_CY
,
"VarMul: expected coerced type VT_CY, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromCy
(
V_CY
(
&
result
),
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
42399
.
0
),
"VarMul: CY value %f, expected %f
\n
"
,
r
,
(
double
)
42399
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
42399
.
0
),
"VarMul: CY value %f, expected %f
\n
"
,
r
,
42399
.
0
);
hres
=
pVarMul
(
&
left
,
&
dec
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_DECIMAL
,
"VarMul: expected coerced type VT_DECIMAL, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromDec
(
&
V_DECIMAL
(
&
result
),
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
46
.
2
),
"VarMul: DECIMAL value %f, expected %f
\n
"
,
r
,
(
double
)
46
.
2
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
46
.
2
),
"VarMul: DECIMAL value %f, expected %f
\n
"
,
r
,
46
.
2
);
SysFreeString
(
lbstr
);
SysFreeString
(
rbstr
);
...
...
@@ -5704,7 +5703,7 @@ static void test_VarAdd(void)
hres
=
pVarAdd
(
&
left
,
&
right
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_BSTR
,
"VarAdd: expected coerced type VT_BSTR, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromStr
(
V_BSTR
(
&
result
),
0
,
0
,
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
1212
.
0
),
"VarAdd: BSTR value %f, expected %f
\n
"
,
r
,
(
double
)
1212
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
1212
.
0
),
"VarAdd: BSTR value %f, expected %f
\n
"
,
r
,
1212
.
0
);
VariantClear
(
&
result
);
/* Manuly test some VT_CY and VT_DECIMAL variants */
...
...
@@ -5724,12 +5723,12 @@ static void test_VarAdd(void)
hres
=
pVarAdd
(
&
cy
,
&
right
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_CY
,
"VarAdd: expected coerced type VT_CY, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromCy
(
V_CY
(
&
result
),
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
4720
.
0
),
"VarAdd: CY value %f, expected %f
\n
"
,
r
,
(
double
)
472
0
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
4720
.
0
),
"VarAdd: CY value %f, expected %f
\n
"
,
r
,
4720
.
0
);
hres
=
pVarAdd
(
&
left
,
&
dec
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_DECIMAL
,
"VarAdd: expected coerced type VT_DECIMAL, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromDec
(
&
V_DECIMAL
(
&
result
),
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
-
15
.
2
),
"VarAdd: DECIMAL value %f, expected %f
\n
"
,
r
,
(
double
)
-
15
.
2
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
-
15
.
2
),
"VarAdd: DECIMAL value %f, expected %f
\n
"
,
r
,
-
15
.
2
);
VariantClear
(
&
result
);
SysFreeString
(
lbstr
);
...
...
@@ -7994,40 +7993,37 @@ static void test_VarDiv(void)
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_R8
,
"VARDIV: expected coerced type VT_R8, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
V_R8
(
&
result
),
1
.
0
),
"VARDIV: CY value %f, expected %f
\n
"
,
V_R8
(
&
result
),
(
double
)
1
.
0
);
"VARDIV: CY value %f, expected %f
\n
"
,
V_R8
(
&
result
),
1
.
0
);
hres
=
pVarDiv
(
&
cy
,
&
right
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_R8
,
"VARDIV: expected coerced type VT_R8, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
V_R8
(
&
result
),
5000
.
0
),
"VARDIV: CY value %f, expected %f
\n
"
,
V_R8
(
&
result
),
(
double
)
5000
.
0
);
"VARDIV: CY value %f, expected %f
\n
"
,
V_R8
(
&
result
),
5000
.
0
);
hres
=
pVarDiv
(
&
left
,
&
cy
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_R8
,
"VARDIV: expected coerced type VT_R8, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
V_R8
(
&
result
),
0
.
01
),
"VARDIV: CY value %f, expected %f
\n
"
,
V_R8
(
&
result
),
(
double
)
0
.
01
);
"VARDIV: CY value %f, expected %f
\n
"
,
V_R8
(
&
result
),
0
.
01
);
hres
=
pVarDiv
(
&
left
,
&
dec
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_DECIMAL
,
"VARDIV: expected coerced type VT_DECIMAL, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromDec
(
&
V_DECIMAL
(
&
result
),
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
50
.
0
),
"VARDIV: DECIMAL value %f, expected %f
\n
"
,
r
,
(
double
)
50
.
0
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
50
.
0
),
"VARDIV: DECIMAL value %f, expected %f
\n
"
,
r
,
50
.
0
);
hres
=
pVarDiv
(
&
dec
,
&
dec
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_DECIMAL
,
"VARDIV: expected coerced type VT_DECIMAL, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromDec
(
&
V_DECIMAL
(
&
result
),
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
1
.
0
),
"VARDIV: DECIMAL value %f, expected %f
\n
"
,
r
,
(
double
)
1
.
0
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
1
.
0
),
"VARDIV: DECIMAL value %f, expected %f
\n
"
,
r
,
1
.
0
);
hres
=
pVarDiv
(
&
dec
,
&
right
,
&
result
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
result
)
==
VT_DECIMAL
,
"VARDIV: expected coerced type VT_DECIMAL, got %s!
\n
"
,
vtstr
(
V_VT
(
&
result
)));
hres
=
VarR8FromDec
(
&
V_DECIMAL
(
&
result
),
&
r
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
1
.
0
),
"VARDIV: DECIMAL value %f, expected %f
\n
"
,
r
,
(
double
)
1
.
0
);
ok
(
hres
==
S_OK
&&
EQ_DOUBLE
(
r
,
1
.
0
),
"VARDIV: DECIMAL value %f, expected %f
\n
"
,
r
,
1
.
0
);
/* Check for division by zero and overflow */
V_VT
(
&
left
)
=
VT_R8
;
...
...
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