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
c290f623
Commit
c290f623
authored
Dec 24, 2006
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Dec 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix VarMod(VT_DECIMAL) test by properly initializing the DECIMAL to use.
Fix Wine handling of VT_DECIMAL in VarMod.
parent
46bb89e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
23 deletions
+31
-23
vartest.c
dlls/oleaut32/tests/vartest.c
+24
-10
variant.c
dlls/oleaut32/variant.c
+7
-13
No files found.
dlls/oleaut32/tests/vartest.c
View file @
c290f623
...
...
@@ -2261,12 +2261,12 @@ static void test_VarMod(void)
case
VT_BOOL
:
case
VT_DATE
:
case
VT_CY
:
case
VT_DECIMAL
:
hexpected
=
S_OK
;
break
;
case
VT_ERROR
:
case
VT_VARIANT
:
case
VT_UNKNOWN
:
case
VT_DECIMAL
:
case
VT_RECORD
:
lValid
=
FALSE
;
break
;
...
...
@@ -2296,13 +2296,13 @@ static void test_VarMod(void)
case
VT_R8
:
case
VT_BOOL
:
case
VT_DATE
:
case
VT_DECIMAL
:
case
VT_CY
:
hexpected
=
S_OK
;
break
;
case
VT_ERROR
:
case
VT_VARIANT
:
case
VT_UNKNOWN
:
case
VT_DECIMAL
:
case
VT_RECORD
:
rValid
=
FALSE
;
break
;
...
...
@@ -2341,18 +2341,18 @@ static void test_VarMod(void)
}
else
if
((
l
==
VT_NULL
)
&&
(
r
==
VT_RECORD
))
{
hexpected
=
DISP_E_TYPEMISMATCH
;
}
else
if
((
l
==
VT_
NULL
)
&&
(
r
==
VT_DECIMAL
))
}
else
if
((
l
==
VT_
I8
)
&&
(
r
==
VT_DECIMAL
))
{
hexpected
=
E_INVALIDARG
;
hexpected
=
S_OK
;
}
else
if
((
l
==
VT_DECIMAL
)
&&
(
r
==
VT_I8
))
{
hexpected
=
S_OK
;
}
else
if
((
l
==
VT_UNKNOWN
)
||
((
r
==
VT_UNKNOWN
)
&&
lFound
&&
lValid
))
{
hexpected
=
DISP_E_TYPEMISMATCH
;
}
else
if
((
l
==
VT_NULL
)
&&
rFound
)
{
hexpected
=
S_OK
;
}
else
if
((
l
==
VT_DECIMAL
)
||
((
r
==
VT_DECIMAL
)
&&
lFound
&&
lValid
))
{
hexpected
=
E_INVALIDARG
;
}
else
if
(
l
==
VT_RECORD
)
{
hexpected
=
DISP_E_TYPEMISMATCH
;
...
...
@@ -2399,8 +2399,16 @@ static void test_VarMod(void)
V_R8
(
&
v1
)
=
100
;
else
if
(
l
==
VT_UI8
)
V_UI8
(
&
v1
)
=
100
;
else
if
(
l
==
VT_I8
)
V_I8
(
&
v1
)
=
100
;
else
if
(
l
==
VT_DATE
)
V_DATE
(
&
v1
)
=
1000
;
else
if
(
l
==
VT_DECIMAL
)
{
V_DECIMAL
(
&
v1
).
Hi32
=
0
;
V_DECIMAL
(
&
v1
).
Lo64
=
100
;
V_DECIMAL
(
&
v1
).
signscale
=
0
;
}
else
V_I4
(
&
v1
)
=
10000
;
...
...
@@ -2412,8 +2420,16 @@ static void test_VarMod(void)
V_R8
(
&
v2
)
=
100
;
else
if
(
r
==
VT_UI8
)
V_UI8
(
&
v2
)
=
100
;
else
if
(
r
==
VT_I8
)
V_I8
(
&
v2
)
=
100
;
else
if
(
r
==
VT_DATE
)
V_DATE
(
&
v2
)
=
1000
;
else
if
(
r
==
VT_DECIMAL
)
{
V_DECIMAL
(
&
v2
).
Hi32
=
0
;
V_DECIMAL
(
&
v2
).
Lo64
=
100
;
V_DECIMAL
(
&
v2
).
signscale
=
0
;
}
else
V_I4
(
&
v2
)
=
10000
;
...
...
@@ -2478,7 +2494,6 @@ static void test_VarMod(void)
"VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d
\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
));
...
...
@@ -2494,7 +2509,6 @@ static void test_VarMod(void)
hres
=
pVarMod
(
&
v1
,
&
v2
,
&
vDst
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
VT_I4
&&
V_I4
(
&
vDst
)
==
0
,
"VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d
\n
"
,
S_OK
,
VT_I4
,
0
,
hres
,
V_VT
(
&
vDst
),
V_I4
(
&
vDst
));
}
VARMOD2
(
UINT
,
I4
,
100
,
10
,
I4
,
0
,
S_OK
);
...
...
@@ -5170,7 +5184,7 @@ static void test_VarCat(void)
hres
=
VarCat
(
&
left
,
&
right
,
&
result
);
ok
(
hres
==
S_OK
,
"VarCat failed with error 0x%08x
\n
"
,
hres
);
ok
(
VarCmp
(
&
result
,
&
expected
,
lcid
,
0
)
==
VARCMP_EQ
,
"VarCat: VT_INT concat with VT_BOOL (TRUE) returned in
n
correct result
\n
"
);
"VarCat: VT_INT concat with VT_BOOL (TRUE) returned incorrect result
\n
"
);
VariantClear
(
&
left
);
VariantClear
(
&
right
);
...
...
dlls/oleaut32/variant.c
View file @
c290f623
...
...
@@ -5032,14 +5032,12 @@ HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result)
case
VT_EMPTY
:
case
VT_DATE
:
case
VT_BSTR
:
case
VT_DECIMAL
:
break
;
case
VT_VARIANT
:
case
VT_UNKNOWN
:
V_VT
(
result
)
=
VT_EMPTY
;
return
DISP_E_TYPEMISMATCH
;
case
VT_DECIMAL
:
V_VT
(
result
)
=
VT_EMPTY
;
return
E_INVALIDARG
;
case
VT_ERROR
:
return
DISP_E_TYPEMISMATCH
;
case
VT_RECORD
:
...
...
@@ -5086,6 +5084,12 @@ HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result)
}
case
VT_EMPTY
:
case
VT_DATE
:
case
VT_DECIMAL
:
if
(
V_VT
(
left
)
==
VT_ERROR
)
{
V_VT
(
result
)
=
VT_EMPTY
;
return
DISP_E_TYPEMISMATCH
;
}
case
VT_BSTR
:
if
(
V_VT
(
left
)
==
VT_NULL
)
{
...
...
@@ -5116,16 +5120,6 @@ HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result)
case
VT_UNKNOWN
:
V_VT
(
result
)
=
VT_EMPTY
;
return
DISP_E_TYPEMISMATCH
;
case
VT_DECIMAL
:
if
(
V_VT
(
left
)
==
VT_ERROR
)
{
V_VT
(
result
)
=
VT_EMPTY
;
return
DISP_E_TYPEMISMATCH
;
}
else
{
V_VT
(
result
)
=
VT_EMPTY
;
return
E_INVALIDARG
;
}
case
VT_ERROR
:
return
DISP_E_TYPEMISMATCH
;
case
VT_RECORD
:
...
...
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