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
e6aace7a
Commit
e6aace7a
authored
Oct 31, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: Added SAXAttributes object pointer tests.
parent
1b46206a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
saxreader.c
dlls/msxml3/tests/saxreader.c
+30
-6
No files found.
dlls/msxml3/tests/saxreader.c
View file @
e6aace7a
...
...
@@ -124,6 +124,7 @@ static const CHAR szTestXML[] =
static
const
CHAR
szTestAttributes
[]
=
"<?xml version=
\"
1.0
\"
?>
\n
"
"<document xmlns:test=
\"
prefix_test
\"
xmlns=
\"
prefix
\"
test:arg1=
\"
arg1
\"
arg2=
\"
arg2
\"
>
\n
"
"<node1 xmlns:p=
\"
test
\"
/>"
"</document>
\n
"
;
typedef
struct
_contenthandlercheck
{
...
...
@@ -214,9 +215,13 @@ static content_handler_test contentHandlerTestAttributes[] = {
{
CH_STARTPREFIXMAPPING
,
2
,
80
,
2
,
79
,
""
,
"prefix"
},
{
CH_STARTELEMENT
,
2
,
80
,
2
,
79
,
"prefix"
,
"document"
,
"document"
},
{
CH_CHARACTERS
,
2
,
80
,
3
,
1
,
"
\n
"
},
{
CH_ENDELEMENT
,
3
,
3
,
3
,
11
,
"prefix"
,
"document"
,
"document"
},
{
CH_ENDPREFIXMAPPING
,
3
,
3
,
3
,
11
,
""
},
{
CH_ENDPREFIXMAPPING
,
3
,
3
,
3
,
11
,
"test"
},
{
CH_STARTPREFIXMAPPING
,
3
,
25
,
3
,
24
,
"p"
,
"test"
},
{
CH_STARTELEMENT
,
3
,
25
,
3
,
24
,
"prefix"
,
"node1"
,
"node1"
},
{
CH_ENDELEMENT
,
3
,
25
,
3
,
24
,
"prefix"
,
"node1"
,
"node1"
},
{
CH_ENDPREFIXMAPPING
,
3
,
25
,
3
,
24
,
"p"
},
{
CH_ENDELEMENT
,
3
,
27
,
3
,
35
,
"prefix"
,
"document"
,
"document"
},
{
CH_ENDPREFIXMAPPING
,
3
,
27
,
3
,
35
,
""
},
{
CH_ENDPREFIXMAPPING
,
3
,
27
,
3
,
35
,
"test"
},
{
CH_ENDDOCUMENT
,
0
,
0
,
4
,
0
},
{
CH_ENDTEST
}
};
...
...
@@ -228,9 +233,13 @@ static content_handler_test contentHandlerTestAttributes6[] = {
{
CH_STARTPREFIXMAPPING
,
2
,
80
,
2
,
79
,
""
,
"prefix"
},
{
CH_STARTELEMENT
,
2
,
80
,
2
,
79
,
"prefix"
,
"document"
,
"document"
},
{
CH_CHARACTERS
,
2
,
80
,
3
,
1
,
"
\n
"
},
{
CH_ENDELEMENT
,
3
,
3
,
3
,
11
,
"prefix"
,
"document"
,
"document"
},
{
CH_ENDPREFIXMAPPING
,
3
,
3
,
3
,
11
,
"test"
},
{
CH_ENDPREFIXMAPPING
,
3
,
3
,
3
,
11
,
""
},
{
CH_STARTPREFIXMAPPING
,
3
,
25
,
3
,
24
,
"p"
,
"test"
},
{
CH_STARTELEMENT
,
3
,
25
,
3
,
24
,
"prefix"
,
"node1"
,
"node1"
},
{
CH_ENDELEMENT
,
3
,
25
,
3
,
24
,
"prefix"
,
"node1"
,
"node1"
},
{
CH_ENDPREFIXMAPPING
,
3
,
25
,
3
,
24
,
"p"
},
{
CH_ENDELEMENT
,
3
,
27
,
3
,
35
,
"prefix"
,
"document"
,
"document"
},
{
CH_ENDPREFIXMAPPING
,
3
,
27
,
3
,
35
,
"test"
},
{
CH_ENDPREFIXMAPPING
,
3
,
27
,
3
,
35
,
""
},
{
CH_ENDDOCUMENT
,
0
,
0
,
4
,
0
},
{
CH_ENDTEST
}
};
...
...
@@ -313,6 +322,9 @@ static HRESULT WINAPI contentHandler_putDocumentLocator(
ISAXContentHandler
*
iface
,
ISAXLocator
*
pLocator
)
{
ISAXAttributes
*
attr
;
HRESULT
hres
;
if
(
!
test_expect_call
(
CH_PUTDOCUMENTLOCATOR
))
return
E_FAIL
;
...
...
@@ -320,15 +332,23 @@ static HRESULT WINAPI contentHandler_putDocumentLocator(
test_locator
(
__LINE__
,
msxml_version
>=
6
?
expectCall
->
line_v6
:
expectCall
->
line
,
msxml_version
>=
6
?
expectCall
->
column_v6
:
expectCall
->
column
);
if
(
msxml_version
>=
6
)
{
hres
=
ISAXLocator_QueryInterface
(
pLocator
,
&
IID_ISAXAttributes
,
(
void
**
)
&
attr
);
ok
(
hres
==
S_OK
,
"QueryInterface failed: %x
\n
"
,
hres
);
ISAXAttributes_Release
(
attr
);
}
return
(
expectCall
++
)
->
ret
;
}
static
ISAXAttributes
*
test_attr_ptr
;
static
HRESULT
WINAPI
contentHandler_startDocument
(
ISAXContentHandler
*
iface
)
{
if
(
!
test_expect_call
(
CH_STARTDOCUMENT
))
return
E_FAIL
;
test_attr_ptr
=
NULL
;
test_locator
(
__LINE__
,
msxml_version
>=
6
?
expectCall
->
line_v6
:
expectCall
->
line
,
msxml_version
>=
6
?
expectCall
->
column_v6
:
expectCall
->
column
);
...
...
@@ -402,6 +422,10 @@ static HRESULT WINAPI contentHandler_startElement(
test_locator
(
__LINE__
,
msxml_version
>=
6
?
expectCall
->
line_v6
:
expectCall
->
line
,
msxml_version
>=
6
?
expectCall
->
column_v6
:
expectCall
->
column
);
if
(
!
test_attr_ptr
)
test_attr_ptr
=
pAttr
;
ok
(
test_attr_ptr
==
pAttr
,
"Multiple ISAXAttributes instances are used (%p %p)
\n
"
,
test_attr_ptr
,
pAttr
);
if
(
expectCall
==
contentHandlerTestAttributes
+
4
)
{
int
i
;
/* msxml3 returns attributes and namespaces in the input order */
...
...
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