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
a36f51f3
Commit
a36f51f3
authored
Dec 29, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/tests: Use an iface instead of a vtbl pointer in testinput.
parent
d15f5722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
reader.c
dlls/xmllite/tests/reader.c
+13
-11
No files found.
dlls/xmllite/tests/reader.c
View file @
a36f51f3
...
...
@@ -19,6 +19,7 @@
*/
#define COBJMACROS
#define CONST_VTABLE
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -258,13 +259,13 @@ static void test_read_state_(IXmlReader *reader, XmlReadState expected,
typedef
struct
_testinput
{
const
IUnknownVtbl
*
lpVtbl
;
IUnknown
IUnknown_iface
;
LONG
ref
;
}
testinput
;
static
inline
testinput
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
return
(
testinput
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
testinput
,
lpVtbl
)
);
return
CONTAINING_RECORD
(
iface
,
testinput
,
IUnknown_iface
);
}
static
HRESULT
WINAPI
testinput_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppvObj
)
...
...
@@ -317,10 +318,10 @@ static HRESULT testinput_createinstance(void **ppObj)
input
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
input
));
if
(
!
input
)
return
E_OUTOFMEMORY
;
input
->
lpVtbl
=
&
testinput_vtbl
;
input
->
IUnknown_iface
.
lpVtbl
=
&
testinput_vtbl
;
input
->
ref
=
1
;
*
ppObj
=
&
input
->
lpVtbl
;
*
ppObj
=
&
input
->
IUnknown_iface
;
return
S_OK
;
}
...
...
@@ -372,13 +373,14 @@ static void test_reader_create(void)
hr
=
testinput_createinstance
((
void
**
)
&
input
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
input_iids
.
count
=
0
;
hr
=
IXmlReader_SetInput
(
reader
,
input
);
ok
(
hr
==
E_NOINTERFACE
,
"Expected E_NOINTERFACE, got %08x
\n
"
,
hr
);
ok_iids
(
&
input_iids
,
setinput_full
,
setinput_full_old
,
FALSE
);
IUnknown_Release
(
input
);
if
(
hr
==
S_OK
)
{
input_iids
.
count
=
0
;
hr
=
IXmlReader_SetInput
(
reader
,
input
);
ok
(
hr
==
E_NOINTERFACE
,
"Expected E_NOINTERFACE, got %08x
\n
"
,
hr
);
ok_iids
(
&
input_iids
,
setinput_full
,
setinput_full_old
,
FALSE
);
IUnknown_Release
(
input
);
}
IXmlReader_Release
(
reader
);
}
...
...
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