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
9c5b9399
Commit
9c5b9399
authored
Aug 10, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices/tests: Add some tests for WsSetWriterPosition.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
af02e108
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
writer.c
dlls/webservices/tests/writer.c
+24
-0
No files found.
dlls/webservices/tests/writer.c
View file @
9c5b9399
...
...
@@ -1576,6 +1576,7 @@ static void test_WsGetWriterPosition(void)
static
void
test_WsSetWriterPosition
(
void
)
{
WS_XML_STRING
localname
=
{
1
,
(
BYTE
*
)
"t"
},
ns
=
{
0
,
NULL
};
WS_HEAP
*
heap
;
WS_XML_WRITER
*
writer
;
WS_XML_BUFFER
*
buf1
,
*
buf2
;
...
...
@@ -1617,6 +1618,29 @@ static void test_WsSetWriterPosition(void)
hr
=
WsSetWriterPosition
(
writer
,
&
pos
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsSetOutputToBuffer
(
writer
,
buf1
,
NULL
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
/* try to write at non-final position */
hr
=
WsWriteStartElement
(
writer
,
NULL
,
&
localname
,
&
ns
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
pos
.
buffer
=
pos
.
node
=
NULL
;
hr
=
WsGetWriterPosition
(
writer
,
&
pos
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
pos
.
buffer
==
buf1
,
"wrong buffer
\n
"
);
ok
(
pos
.
node
!=
NULL
,
"node not set
\n
"
);
hr
=
WsWriteEndElement
(
writer
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
check_output_buffer
(
buf1
,
"<t/>"
,
__LINE__
);
hr
=
WsSetWriterPosition
(
writer
,
&
pos
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsWriteStartElement
(
writer
,
NULL
,
&
localname
,
&
ns
,
NULL
);
todo_wine
ok
(
hr
==
WS_E_INVALID_FORMAT
,
"got %08x
\n
"
,
hr
);
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