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
f2b39978
Commit
f2b39978
authored
Jun 14, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices/tests: Add a test for WsCopyNode.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
14c1cd97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
writer.c
dlls/webservices/tests/writer.c
+18
-12
No files found.
dlls/webservices/tests/writer.c
View file @
f2b39978
...
...
@@ -136,7 +136,7 @@ static void test_WsCreateWriter(void)
bytes
.
length
=
0xdeadbeef
;
bytes
.
bytes
=
(
BYTE
*
)
0xdeadbeef
;
size
=
sizeof
(
b
uffer
s
);
size
=
sizeof
(
b
yte
s
);
hr
=
WsGetWriterProperty
(
writer
,
WS_XML_WRITER_PROPERTY_BYTES
,
&
bytes
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
!
bytes
.
length
,
"got %u
\n
"
,
bytes
.
length
);
...
...
@@ -1971,17 +1971,9 @@ static void test_WsWriteNode(void)
static
HRESULT
set_input
(
WS_XML_READER
*
reader
,
const
char
*
data
,
ULONG
size
)
{
WS_XML_READER_TEXT_ENCODING
enc
;
WS_XML_READER_BUFFER_INPUT
input
;
enc
.
encoding
.
encodingType
=
WS_XML_READER_ENCODING_TYPE_TEXT
;
enc
.
charSet
=
WS_CHARSET_AUTO
;
input
.
input
.
inputType
=
WS_XML_READER_INPUT_TYPE_BUFFER
;
input
.
encodedData
=
(
void
*
)
data
;
input
.
encodedDataSize
=
size
;
return
WsSetInput
(
reader
,
&
enc
.
encoding
,
&
input
.
input
,
NULL
,
0
,
NULL
);
WS_XML_READER_TEXT_ENCODING
text
=
{{
WS_XML_READER_ENCODING_TYPE_TEXT
},
WS_CHARSET_AUTO
};
WS_XML_READER_BUFFER_INPUT
buf
=
{{
WS_XML_READER_INPUT_TYPE_BUFFER
},
(
void
*
)
data
,
size
};
return
WsSetInput
(
reader
,
&
text
.
encoding
,
&
buf
.
input
,
NULL
,
0
,
NULL
);
}
static
void
test_WsCopyNode
(
void
)
...
...
@@ -2090,6 +2082,20 @@ static void test_WsCopyNode(void)
ok
(
bufs
.
bufferCount
==
1
,
"got %u
\n
"
,
bufs
.
bufferCount
);
ok
(
bufs
.
buffers
!=
NULL
,
"buffers not set
\n
"
);
/* reader positioned at BOF, single text node */
hr
=
set_input
(
reader
,
"text"
,
sizeof
(
"text"
)
-
1
);
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
"
,
node
->
nodeType
);
hr
=
set_output
(
writer
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsCopyNode
(
writer
,
reader
,
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