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
fbc08085
Commit
fbc08085
authored
Feb 10, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices/tests: Add tests.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57a78706
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
reader.c
dlls/webservices/tests/reader.c
+57
-0
No files found.
dlls/webservices/tests/reader.c
View file @
fbc08085
...
...
@@ -1702,6 +1702,63 @@ static void test_WsMoveReader(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
node
->
nodeType
==
WS_XML_NODE_TYPE_EOF
,
"got %u
\n
"
,
elem
->
node
.
nodeType
);
hr
=
WsMoveReader
(
reader
,
WS_MOVE_TO_ROOT_ELEMENT
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetReaderNode
(
reader
,
&
node
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
elem
=
(
WS_XML_ELEMENT_NODE
*
)
node
;
ok
(
elem
->
node
.
nodeType
==
WS_XML_NODE_TYPE_ELEMENT
,
"got %u
\n
"
,
elem
->
node
.
nodeType
);
ok
(
elem
->
localName
->
length
==
1
,
"got %u
\n
"
,
elem
->
localName
->
length
);
ok
(
!
memcmp
(
elem
->
localName
->
bytes
,
"a"
,
1
),
"wrong data
\n
"
);
hr
=
WsMoveReader
(
reader
,
WS_MOVE_TO_CHILD_ELEMENT
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetReaderNode
(
reader
,
&
node
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
elem
=
(
WS_XML_ELEMENT_NODE
*
)
node
;
ok
(
elem
->
node
.
nodeType
==
WS_XML_NODE_TYPE_ELEMENT
,
"got %u
\n
"
,
elem
->
node
.
nodeType
);
ok
(
elem
->
localName
->
length
==
1
,
"got %u
\n
"
,
elem
->
localName
->
length
);
ok
(
!
memcmp
(
elem
->
localName
->
bytes
,
"b"
,
1
),
"wrong data
\n
"
);
hr
=
WsMoveReader
(
reader
,
WS_MOVE_TO_END_ELEMENT
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetReaderNode
(
reader
,
&
node
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
node
->
nodeType
==
WS_XML_NODE_TYPE_END_ELEMENT
,
"got %u
\n
"
,
elem
->
node
.
nodeType
);
hr
=
WsMoveReader
(
reader
,
WS_MOVE_TO_PARENT_ELEMENT
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetReaderNode
(
reader
,
&
node
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
elem
=
(
WS_XML_ELEMENT_NODE
*
)
node
;
ok
(
elem
->
node
.
nodeType
==
WS_XML_NODE_TYPE_ELEMENT
,
"got %u
\n
"
,
elem
->
node
.
nodeType
);
ok
(
elem
->
localName
->
length
==
1
,
"got %u
\n
"
,
elem
->
localName
->
length
);
ok
(
!
memcmp
(
elem
->
localName
->
bytes
,
"b"
,
1
),
"wrong data
\n
"
);
hr
=
WsMoveReader
(
reader
,
WS_MOVE_TO_PARENT_ELEMENT
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetReaderNode
(
reader
,
&
node
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
elem
=
(
WS_XML_ELEMENT_NODE
*
)
node
;
ok
(
elem
->
node
.
nodeType
==
WS_XML_NODE_TYPE_ELEMENT
,
"got %u
\n
"
,
elem
->
node
.
nodeType
);
ok
(
elem
->
localName
->
length
==
1
,
"got %u
\n
"
,
elem
->
localName
->
length
);
ok
(
!
memcmp
(
elem
->
localName
->
bytes
,
"a"
,
1
),
"wrong data
\n
"
);
hr
=
WsMoveReader
(
reader
,
WS_MOVE_TO_PARENT_ELEMENT
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetReaderNode
(
reader
,
&
node
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
node
->
nodeType
==
WS_XML_NODE_TYPE_BOF
,
"got %u
\n
"
,
elem
->
node
.
nodeType
);
hr
=
WsMoveReader
(
reader
,
WS_MOVE_TO_PARENT_ELEMENT
,
NULL
,
NULL
);
ok
(
hr
==
WS_E_INVALID_FORMAT
,
"got %08x
\n
"
,
hr
);
WsFreeReader
(
reader
);
WsFreeWriter
(
writer
);
WsFreeHeap
(
heap
);
...
...
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