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
cabbe8fa
Commit
cabbe8fa
authored
Jul 08, 2008
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/test: Added ISAXXMLReader test.
parent
a3549cd9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
222 additions
and
0 deletions
+222
-0
Makefile.in
dlls/msxml3/tests/Makefile.in
+1
-0
saxreader.c
dlls/msxml3/tests/saxreader.c
+221
-0
No files found.
dlls/msxml3/tests/Makefile.in
View file @
cabbe8fa
...
...
@@ -7,6 +7,7 @@ IMPORTS = oleaut32 ole32 user32 kernel32
CTESTS
=
\
domdoc.c
\
saxreader.c
\
schema.c
\
xmldoc.c
\
xmlelem.c
...
...
dlls/msxml3/tests/saxreader.c
0 → 100644
View file @
cabbe8fa
/*
* XML test
*
* Copyright 2008 Piotr Caban
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#define CONST_VTABLE
#include <stdio.h>
#include "windows.h"
#include "ole2.h"
#include "msxml2.h"
#include "ocidl.h"
#include "wine/test.h"
typedef
struct
_contenthandler
{
const
struct
ISAXContentHandlerVtbl
*
lpContentHandlerVtbl
;
}
contenthandler
;
static
inline
contenthandler
*
impl_from_ISAXContentHandler
(
ISAXContentHandler
*
iface
)
{
return
(
contenthandler
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
contenthandler
,
lpContentHandlerVtbl
));
}
static
HRESULT
WINAPI
contentHandler_QueryInterface
(
ISAXContentHandler
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
*
ppvObject
=
NULL
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_ISAXContentHandler
))
{
*
ppvObject
=
iface
;
}
else
{
return
E_NOINTERFACE
;
}
return
S_OK
;
}
static
ULONG
WINAPI
contentHandler_AddRef
(
ISAXContentHandler
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
contentHandler_Release
(
ISAXContentHandler
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
contentHandler_putDocumentLocator
(
ISAXContentHandler
*
iface
,
ISAXLocator
*
pLocator
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_startDocument
(
ISAXContentHandler
*
iface
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_endDocument
(
ISAXContentHandler
*
iface
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_startPrefixMapping
(
ISAXContentHandler
*
iface
,
const
WCHAR
*
pPrefix
,
int
nPrefix
,
const
WCHAR
*
pUri
,
int
nUri
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_endPrefixMapping
(
ISAXContentHandler
*
iface
,
const
WCHAR
*
pPrefix
,
int
nPrefix
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_startElement
(
ISAXContentHandler
*
iface
,
const
WCHAR
*
pNamespaceUri
,
int
nNamespaceUri
,
const
WCHAR
*
pLocalName
,
int
nLocalName
,
const
WCHAR
*
pQName
,
int
nQName
,
ISAXAttributes
*
pAttr
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_endElement
(
ISAXContentHandler
*
iface
,
const
WCHAR
*
pNamespaceUri
,
int
nNamespaceUri
,
const
WCHAR
*
pLocalName
,
int
nLocalName
,
const
WCHAR
*
pQName
,
int
nQName
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_characters
(
ISAXContentHandler
*
iface
,
const
WCHAR
*
pChars
,
int
nChars
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_ignorableWhitespace
(
ISAXContentHandler
*
iface
,
const
WCHAR
*
pChars
,
int
nChars
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_processingInstruction
(
ISAXContentHandler
*
iface
,
const
WCHAR
*
pTarget
,
int
nTarget
,
const
WCHAR
*
pData
,
int
nData
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
contentHandler_skippedEntity
(
ISAXContentHandler
*
iface
,
const
WCHAR
*
pName
,
int
nName
)
{
return
S_OK
;
}
static
const
ISAXContentHandlerVtbl
contentHandlerVtbl
=
{
contentHandler_QueryInterface
,
contentHandler_AddRef
,
contentHandler_Release
,
contentHandler_putDocumentLocator
,
contentHandler_startDocument
,
contentHandler_endDocument
,
contentHandler_startPrefixMapping
,
contentHandler_endPrefixMapping
,
contentHandler_startElement
,
contentHandler_endElement
,
contentHandler_characters
,
contentHandler_ignorableWhitespace
,
contentHandler_processingInstruction
,
contentHandler_skippedEntity
};
static
ISAXContentHandler
contentHandler
=
{
&
contentHandlerVtbl
};
static
void
test_saxreader
(
void
)
{
HRESULT
hr
;
ISAXXMLReader
*
reader
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_SAXXMLReader
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISAXXMLReader
,
(
LPVOID
*
)
&
reader
);
if
(
FAILED
(
hr
))
{
skip
(
"Failed to create SAXXMLReader instance
\n
"
);
return
;
}
hr
=
ISAXXMLReader_putContentHandler
(
reader
,
&
contentHandler
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ISAXXMLReader_Release
(
reader
);
}
START_TEST
(
saxreader
)
{
HRESULT
hr
;
hr
=
CoInitialize
(
NULL
);
ok
(
hr
==
S_OK
,
"failed to init com
\n
"
);
test_saxreader
();
CoUninitialize
();
}
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