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
ddd2486e
Commit
ddd2486e
authored
Dec 17, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand the COPYTEST macro to avoid trouble with 64-bit types.
parent
49e13df7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
3 deletions
+42
-3
vartype.c
dlls/oleaut32/tests/vartype.c
+42
-3
No files found.
dlls/oleaut32/tests/vartype.c
View file @
ddd2486e
...
...
@@ -2339,10 +2339,30 @@ static void test_VarI8FromStr(void)
static
void
test_VarI8Copy
(
void
)
{
HRESULT
hres
;
VARIANTARG
vSrc
,
vDst
;
LONGLONG
in
=
1
;
if
(
!
HAVE_OLEAUT32_I8
)
return
;
COPYTEST
(
1
,
VT_I8
,
((
int
)
V_I8
(
&
vSrc
)),
((
int
)
V_I8
(
&
vDst
)),
V_I8REF
(
&
vSrc
),
V_I8REF
(
&
vDst
),
"%d"
);
VariantInit
(
&
vSrc
);
VariantInit
(
&
vDst
);
V_VT
(
&
vSrc
)
=
VT_I8
;
V_I8
(
&
vSrc
)
=
in
;
hres
=
VariantCopy
(
&
vDst
,
&
vSrc
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
VT_I8
&&
V_I8
(
&
vDst
)
==
in
,
"copy hres 0x%lX, type %d, value (%x%08x) %x%08x
\n
"
,
hres
,
V_VT
(
&
vDst
),
(
UINT
)(
in
>>
32
),
(
UINT
)
in
,
(
UINT
)(
V_I8
(
&
vDst
)
>>
32
),
(
UINT
)
V_I8
(
&
vDst
)
);
V_VT
(
&
vSrc
)
=
VT_I8
|
VT_BYREF
;
V_I8REF
(
&
vSrc
)
=
&
in
;
hres
=
VariantCopy
(
&
vDst
,
&
vSrc
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
(
VT_I8
|
VT_BYREF
)
&&
V_I8REF
(
&
vDst
)
==
&
in
,
"ref hres 0x%lX, type %d, ref (%p) %p
\n
"
,
hres
,
V_VT
(
&
vDst
),
&
in
,
V_I8REF
(
&
vDst
));
hres
=
VariantCopyInd
(
&
vDst
,
&
vSrc
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
VT_I8
&&
V_I8
(
&
vDst
)
==
in
,
"copy hres 0x%lX, type %d, value (%x%08x) %x%08x
\n
"
,
hres
,
V_VT
(
&
vDst
),
(
UINT
)(
in
>>
32
),
(
UINT
)
in
,
(
UINT
)(
V_I8
(
&
vDst
)
>>
32
),
(
UINT
)
V_I8
(
&
vDst
)
);
}
static
void
test_VarI8ChangeTypeEx
(
void
)
...
...
@@ -2573,11 +2593,30 @@ static void test_VarUI8FromStr(void)
static
void
test_VarUI8Copy
(
void
)
{
HRESULT
hres
;
VARIANTARG
vSrc
,
vDst
;
ULONGLONG
in
=
1
;
if
(
!
HAVE_OLEAUT32_I8
)
return
;
COPYTEST
(
1
,
VT_UI8
,
((
unsigned
)
V_UI8
(
&
vSrc
)),
((
unsigned
)
V_I8
(
&
vDst
)),
V_UI8REF
(
&
vSrc
),
V_UI8REF
(
&
vDst
),
"%u"
);
VariantInit
(
&
vSrc
);
VariantInit
(
&
vDst
);
V_VT
(
&
vSrc
)
=
VT_UI8
;
V_UI8
(
&
vSrc
)
=
in
;
hres
=
VariantCopy
(
&
vDst
,
&
vSrc
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
VT_UI8
&&
V_UI8
(
&
vDst
)
==
in
,
"copy hres 0x%lX, type %d, value (%x%08x) %x%08x
\n
"
,
hres
,
V_VT
(
&
vDst
),
(
UINT
)(
in
>>
32
),
(
UINT
)
in
,
(
UINT
)(
V_UI8
(
&
vDst
)
>>
32
),
(
UINT
)
V_UI8
(
&
vDst
)
);
V_VT
(
&
vSrc
)
=
VT_UI8
|
VT_BYREF
;
V_UI8REF
(
&
vSrc
)
=
&
in
;
hres
=
VariantCopy
(
&
vDst
,
&
vSrc
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
(
VT_UI8
|
VT_BYREF
)
&&
V_UI8REF
(
&
vDst
)
==
&
in
,
"ref hres 0x%lX, type %d, ref (%p) %p
\n
"
,
hres
,
V_VT
(
&
vDst
),
&
in
,
V_UI8REF
(
&
vDst
));
hres
=
VariantCopyInd
(
&
vDst
,
&
vSrc
);
ok
(
hres
==
S_OK
&&
V_VT
(
&
vDst
)
==
VT_UI8
&&
V_UI8
(
&
vDst
)
==
in
,
"copy hres 0x%lX, type %d, value (%x%08x) %x%08x
\n
"
,
hres
,
V_VT
(
&
vDst
),
(
UINT
)(
in
>>
32
),
(
UINT
)
in
,
(
UINT
)(
V_UI8
(
&
vDst
)
>>
32
),
(
UINT
)
V_UI8
(
&
vDst
)
);
}
static
void
test_VarUI8ChangeTypeEx
(
void
)
...
...
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