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
dbaa6427
Commit
dbaa6427
authored
Sep 27, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "oleaut32/tests: Get_test_recordinfo shouldn't point into a specific VARIANT.".
This reverts commit
27f417eb
. It breaks the tests.
parent
02ce1008
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
vartest.c
dlls/oleaut32/tests/vartest.c
+17
-11
No files found.
dlls/oleaut32/tests/vartest.c
View file @
dbaa6427
...
@@ -246,10 +246,10 @@ typedef struct IRecordInfoImpl
...
@@ -246,10 +246,10 @@ typedef struct IRecordInfoImpl
{
{
IRecordInfo
IRecordInfo_iface
;
IRecordInfo
IRecordInfo_iface
;
LONG
ref
;
LONG
ref
;
void
*
validsrc
;
unsigned
int
recordclear
;
unsigned
int
recordclear
;
unsigned
int
getsize
;
unsigned
int
getsize
;
unsigned
int
recordcopy
;
unsigned
int
recordcopy
;
struct
__tagBRECORD
*
rec
;
}
IRecordInfoImpl
;
}
IRecordInfoImpl
;
static
inline
IRecordInfoImpl
*
impl_from_IRecordInfo
(
IRecordInfo
*
iface
)
static
inline
IRecordInfoImpl
*
impl_from_IRecordInfo
(
IRecordInfo
*
iface
)
...
@@ -299,8 +299,7 @@ static HRESULT WINAPI RecordInfo_RecordClear(IRecordInfo *iface, void *data)
...
@@ -299,8 +299,7 @@ static HRESULT WINAPI RecordInfo_RecordClear(IRecordInfo *iface, void *data)
{
{
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
This
->
recordclear
++
;
This
->
recordclear
++
;
if
(
data
==
This
->
validsrc
)
This
->
rec
->
pvRecord
=
NULL
;
This
->
validsrc
=
NULL
;
/* not valid anymore, now that it's been cleared */
return
S_OK
;
return
S_OK
;
}
}
...
@@ -308,7 +307,7 @@ static HRESULT WINAPI RecordInfo_RecordCopy(IRecordInfo *iface, void *src, void
...
@@ -308,7 +307,7 @@ static HRESULT WINAPI RecordInfo_RecordCopy(IRecordInfo *iface, void *src, void
{
{
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
This
->
recordcopy
++
;
This
->
recordcopy
++
;
ok
(
This
->
validsrc
&&
(
src
==
This
->
validsrc
)
,
"wrong src pointer %p
\n
"
,
src
);
ok
(
src
==
(
void
*
)
0xdeadbeef
,
"wrong src pointer %p
\n
"
,
src
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -431,7 +430,6 @@ static IRecordInfoImpl *get_test_recordinfo(void)
...
@@ -431,7 +430,6 @@ static IRecordInfoImpl *get_test_recordinfo(void)
rec
->
recordclear
=
0
;
rec
->
recordclear
=
0
;
rec
->
getsize
=
0
;
rec
->
getsize
=
0
;
rec
->
recordcopy
=
0
;
rec
->
recordcopy
=
0
;
rec
->
validsrc
=
(
void
*
)
0xdeadbeef
;
return
rec
;
return
rec
;
}
}
...
@@ -769,6 +767,7 @@ static test_VariantClearImpl test_myVariantClearImpl = {{&test_VariantClear_vtbl
...
@@ -769,6 +767,7 @@ static test_VariantClearImpl test_myVariantClearImpl = {{&test_VariantClear_vtbl
static
void
test_VariantClear
(
void
)
static
void
test_VariantClear
(
void
)
{
{
struct
__tagBRECORD
*
rec
;
IRecordInfoImpl
*
recinfo
;
IRecordInfoImpl
*
recinfo
;
HRESULT
hres
;
HRESULT
hres
;
VARIANTARG
v
;
VARIANTARG
v
;
...
@@ -893,12 +892,15 @@ static void test_VariantClear(void)
...
@@ -893,12 +892,15 @@ static void test_VariantClear(void)
/* RECORD */
/* RECORD */
recinfo
=
get_test_recordinfo
();
recinfo
=
get_test_recordinfo
();
V_VT
(
&
v
)
=
VT_RECORD
;
V_VT
(
&
v
)
=
VT_RECORD
;
V_RECORDINFO
(
&
v
)
=
&
recinfo
->
IRecordInfo_iface
;
rec
=
&
V_UNION
(
&
v
,
brecVal
);
V_RECORD
(
&
v
)
=
recinfo
->
validsrc
;
rec
->
pRecInfo
=
&
recinfo
->
IRecordInfo_iface
;
rec
->
pvRecord
=
(
void
*
)
0xdeadbeef
;
recinfo
->
recordclear
=
0
;
recinfo
->
recordclear
=
0
;
recinfo
->
ref
=
2
;
recinfo
->
ref
=
2
;
recinfo
->
rec
=
rec
;
hres
=
VariantClear
(
&
v
);
hres
=
VariantClear
(
&
v
);
ok
(
hres
==
S_OK
,
"ret %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"ret %08lx
\n
"
,
hres
);
ok
(
rec
->
pvRecord
==
NULL
,
"got %p
\n
"
,
rec
->
pvRecord
);
ok
(
recinfo
->
recordclear
==
1
,
"got %d
\n
"
,
recinfo
->
recordclear
);
ok
(
recinfo
->
recordclear
==
1
,
"got %d
\n
"
,
recinfo
->
recordclear
);
ok
(
recinfo
->
ref
==
1
,
"got %ld
\n
"
,
recinfo
->
ref
);
ok
(
recinfo
->
ref
==
1
,
"got %ld
\n
"
,
recinfo
->
ref
);
IRecordInfo_Release
(
&
recinfo
->
IRecordInfo_iface
);
IRecordInfo_Release
(
&
recinfo
->
IRecordInfo_iface
);
...
@@ -906,6 +908,7 @@ static void test_VariantClear(void)
...
@@ -906,6 +908,7 @@ static void test_VariantClear(void)
static
void
test_VariantCopy
(
void
)
static
void
test_VariantCopy
(
void
)
{
{
struct
__tagBRECORD
*
rec
;
IRecordInfoImpl
*
recinfo
;
IRecordInfoImpl
*
recinfo
;
VARIANTARG
vSrc
,
vDst
;
VARIANTARG
vSrc
,
vDst
;
VARTYPE
vt
;
VARTYPE
vt
;
...
@@ -1030,17 +1033,20 @@ static void test_VariantCopy(void)
...
@@ -1030,17 +1033,20 @@ static void test_VariantCopy(void)
V_VT
(
&
vDst
)
=
VT_EMPTY
;
V_VT
(
&
vDst
)
=
VT_EMPTY
;
V_VT
(
&
vSrc
)
=
VT_RECORD
;
V_VT
(
&
vSrc
)
=
VT_RECORD
;
V_RECORDINFO
(
&
vSrc
)
=
&
recinfo
->
IRecordInfo_iface
;
rec
=
&
V_UNION
(
&
vSrc
,
brecVal
);
V_RECORD
(
&
vSrc
)
=
recinfo
->
validsrc
;
rec
->
pRecInfo
=
&
recinfo
->
IRecordInfo_iface
;
rec
->
pvRecord
=
(
void
*
)
0xdeadbeef
;
recinfo
->
recordclear
=
0
;
recinfo
->
recordclear
=
0
;
recinfo
->
recordcopy
=
0
;
recinfo
->
recordcopy
=
0
;
recinfo
->
getsize
=
0
;
recinfo
->
getsize
=
0
;
recinfo
->
rec
=
rec
;
hres
=
VariantCopy
(
&
vDst
,
&
vSrc
);
hres
=
VariantCopy
(
&
vDst
,
&
vSrc
);
ok
(
hres
==
S_OK
,
"ret %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"ret %08lx
\n
"
,
hres
);
ok
(
V_RECORD
(
&
vDst
)
!=
recinfo
->
validsrc
&&
V_RECORD
(
&
vDst
)
!=
NULL
,
"got %p
\n
"
,
V_RECORD
(
&
vDst
));
rec
=
&
V_UNION
(
&
vDst
,
brecVal
);
ok
(
V_RECORDINFO
(
&
vDst
)
==
&
recinfo
->
IRecordInfo_iface
,
"got %p
\n
"
,
V_RECORDINFO
(
&
vDst
));
ok
(
rec
->
pvRecord
!=
(
void
*
)
0xdeadbeef
&&
rec
->
pvRecord
!=
NULL
,
"got %p
\n
"
,
rec
->
pvRecord
);
ok
(
rec
->
pRecInfo
==
&
recinfo
->
IRecordInfo_iface
,
"got %p
\n
"
,
rec
->
pRecInfo
);
ok
(
recinfo
->
getsize
==
1
,
"got %d
\n
"
,
recinfo
->
recordclear
);
ok
(
recinfo
->
getsize
==
1
,
"got %d
\n
"
,
recinfo
->
recordclear
);
ok
(
recinfo
->
recordcopy
==
1
,
"got %d
\n
"
,
recinfo
->
recordclear
);
ok
(
recinfo
->
recordcopy
==
1
,
"got %d
\n
"
,
recinfo
->
recordclear
);
...
...
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