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
58dcfb62
Commit
58dcfb62
authored
Apr 23, 2004
by
Chris Morgan
Committed by
Alexandre Julliard
Apr 23, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip over most of the unused variant types to speed up the variant
tests.
parent
7930ce12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
vartest.c
dlls/oleaut32/tests/vartest.c
+38
-0
No files found.
dlls/oleaut32/tests/vartest.c
View file @
58dcfb62
...
...
@@ -75,6 +75,8 @@ static HRESULT (WINAPI *pVarFormat)(LPVARIANT,LPOLESTR,int,int,ULONG,BSTR*);
*/
#define EQ_DOUBLE(a,b) (fabs((a)-(b))<1e-14)
#define SKIPTESTS(a) if((a > VT_CLSID+10) && (a < VT_BSTR_BLOB-10)) continue;
static
inline
int
strcmpW
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
)
{
while
(
*
str1
&&
(
*
str1
==
*
str2
))
{
str1
++
;
str2
++
;
}
...
...
@@ -272,6 +274,8 @@ static void test_VariantClear(void)
{
HRESULT
hExpected
=
DISP_E_BADVARTYPE
;
SKIPTESTS
(
vt
);
memset
(
&
v
,
0
,
sizeof
(
v
));
V_VT
(
&
v
)
=
vt
|
ExtraFlags
[
i
];
...
...
@@ -303,6 +307,8 @@ static void test_VariantCopy(void)
{
for
(
vt
=
0
;
vt
<=
VT_BSTR_BLOB
;
vt
++
)
{
SKIPTESTS
(
vt
);
memset
(
&
vSrc
,
0
,
sizeof
(
vSrc
));
V_VT
(
&
vSrc
)
=
vt
|
ExtraFlags
[
i
];
...
...
@@ -329,6 +335,8 @@ static void test_VariantCopy(void)
{
for
(
vt
=
0
;
vt
<=
VT_BSTR_BLOB
;
vt
++
)
{
SKIPTESTS
(
vt
);
hExpected
=
DISP_E_BADVARTYPE
;
memset
(
&
vDst
,
0
,
sizeof
(
vDst
));
...
...
@@ -353,6 +361,8 @@ static void test_VariantCopy(void)
{
for
(
vt
=
0
;
vt
<=
VT_BSTR_BLOB
;
vt
++
)
{
SKIPTESTS
(
vt
);
hExpected
=
DISP_E_BADVARTYPE
;
memset
(
&
vDst
,
0
,
sizeof
(
vDst
));
...
...
@@ -410,6 +420,8 @@ static void test_VariantCopyInd(void)
for
(
vt
=
0
;
vt
<=
VT_BSTR_BLOB
;
vt
++
)
{
SKIPTESTS
(
vt
);
memset
(
&
vSrc
,
0
,
sizeof
(
vSrc
));
V_VT
(
&
vSrc
)
=
vt
|
ExtraFlags
[
i
];
...
...
@@ -456,6 +468,8 @@ static void test_VariantCopyInd(void)
{
for
(
vt
=
0
;
vt
<=
VT_BSTR_BLOB
;
vt
++
)
{
SKIPTESTS
(
vt
);
memset
(
&
vDst
,
0
,
sizeof
(
vDst
));
V_VT
(
&
vDst
)
=
vt
|
ExtraFlags
[
i
];
...
...
@@ -483,6 +497,8 @@ static void test_VariantCopyInd(void)
for
(
vt
=
0
;
vt
<=
VT_BSTR_BLOB
;
vt
++
)
{
SKIPTESTS
(
vt
);
memset
(
&
vDst
,
0
,
sizeof
(
vDst
));
V_VT
(
&
vDst
)
=
VT_EMPTY
;
...
...
@@ -1609,6 +1625,8 @@ static void test_VarAbs(void)
{
HRESULT
hExpected
=
DISP_E_BADVARTYPE
;
SKIPTESTS
(
vt
);
memset
(
&
v
,
0
,
sizeof
(
v
));
V_VT
(
&
v
)
=
vt
|
ExtraFlags
[
i
];
V_VT
(
&
vDst
)
=
VT_EMPTY
;
...
...
@@ -1693,6 +1711,8 @@ static void test_VarNot(void)
{
HRESULT
hExpected
=
DISP_E_BADVARTYPE
;
SKIPTESTS
(
vt
);
memset
(
&
v
,
0
,
sizeof
(
v
));
V_VT
(
&
v
)
=
vt
|
ExtraFlags
[
i
];
V_VT
(
&
vDst
)
=
VT_EMPTY
;
...
...
@@ -1942,8 +1962,12 @@ static void test_VarMod(void)
/* test all combinations of types */
for
(
l
=
0
;
l
<
VT_BSTR_BLOB
;
l
++
)
{
SKIPTESTS
(
l
);
for
(
r
=
0
;
r
<
VT_BSTR_BLOB
;
r
++
)
{
SKIPTESTS
(
r
);
if
(
l
==
VT_BSTR
)
continue
;
if
(
l
==
VT_DISPATCH
)
continue
;
if
(
r
==
VT_BSTR
)
continue
;
...
...
@@ -2264,6 +2288,8 @@ static void test_VarFix(void)
{
HRESULT
bFail
=
TRUE
;
SKIPTESTS
(
vt
);
memset
(
&
v
,
0
,
sizeof
(
v
));
V_VT
(
&
v
)
=
vt
|
ExtraFlags
[
i
];
V_VT
(
&
vDst
)
=
VT_EMPTY
;
...
...
@@ -2378,6 +2404,8 @@ static void test_VarInt(void)
{
HRESULT
bFail
=
TRUE
;
SKIPTESTS
(
vt
);
memset
(
&
v
,
0
,
sizeof
(
v
));
V_VT
(
&
v
)
=
vt
|
ExtraFlags
[
i
];
V_VT
(
&
vDst
)
=
VT_EMPTY
;
...
...
@@ -2497,6 +2525,8 @@ static void test_VarNeg(void)
{
HRESULT
bFail
=
TRUE
;
SKIPTESTS
(
vt
);
memset
(
&
v
,
0
,
sizeof
(
v
));
V_VT
(
&
v
)
=
vt
|
ExtraFlags
[
i
];
V_VT
(
&
vDst
)
=
VT_EMPTY
;
...
...
@@ -2735,10 +2765,14 @@ static void test_VarXor(void)
for
(
leftvt
=
0
;
leftvt
<=
VT_BSTR_BLOB
;
leftvt
++
)
{
SKIPTESTS
(
leftvt
);
for
(
rightvt
=
0
;
rightvt
<=
VT_BSTR_BLOB
;
rightvt
++
)
{
BOOL
bFail
=
FALSE
;
SKIPTESTS
(
rightvt
);
if
(
leftvt
==
VT_BSTR
||
rightvt
==
VT_BSTR
||
leftvt
==
VT_DISPATCH
||
rightvt
==
VT_DISPATCH
||
leftvt
==
VT_UNKNOWN
||
rightvt
==
VT_UNKNOWN
)
...
...
@@ -2875,10 +2909,14 @@ static void test_VarEqv(void)
for
(
leftvt
=
0
;
leftvt
<=
VT_BSTR_BLOB
;
leftvt
++
)
{
SKIPTESTS
(
leftvt
);
for
(
rightvt
=
0
;
rightvt
<=
VT_BSTR_BLOB
;
rightvt
++
)
{
BOOL
bFail
=
FALSE
;
SKIPTESTS
(
rightvt
);
if
(
leftvt
==
VT_BSTR
||
rightvt
==
VT_BSTR
||
leftvt
==
VT_DISPATCH
||
rightvt
==
VT_DISPATCH
||
leftvt
==
VT_UNKNOWN
||
rightvt
==
VT_UNKNOWN
)
...
...
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