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
e3851a87
Commit
e3851a87
authored
Jan 24, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webervices/tests: Add tests for out of range string IDs.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
69ea451b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
reader.c
dlls/webservices/tests/reader.c
+21
-0
No files found.
dlls/webservices/tests/reader.c
View file @
e3851a87
...
...
@@ -5612,6 +5612,10 @@ static void test_dictionary(void)
{
0x40
,
0x01
,
't'
,
0x0a
,
0x0a
,
0x01
};
static
const
char
test8
[]
=
{
0x40
,
0x01
,
't'
,
0x0b
,
0x01
,
'p'
,
0x0a
,
0x01
};
static
const
char
test9
[]
=
{
0x42
,
0x0c
,
0x01
};
static
const
char
test10
[]
=
{
0x42
,
0x04
,
0xab
,
0x0c
,
0x01
};
const
WS_XML_NODE
*
node
;
const
WS_XML_ELEMENT_NODE
*
elem
;
const
WS_XML_ATTRIBUTE
*
attr
;
...
...
@@ -5940,6 +5944,23 @@ static void test_dictionary(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
node
->
nodeType
==
WS_XML_NODE_TYPE_END_ELEMENT
,
"got %u
\n
"
,
node
->
nodeType
);
/* element name string id out of range */
hr
=
set_input_bin
(
reader
,
test9
,
sizeof
(
test9
),
&
dict
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsReadNode
(
reader
,
NULL
);
ok
(
hr
==
WS_E_INVALID_FORMAT
,
"got %08x
\n
"
,
hr
);
/* text string id out of range */
hr
=
set_input_bin
(
reader
,
test10
,
sizeof
(
test10
),
&
dict
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsReadNode
(
reader
,
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_ELEMENT
,
"got %u
\n
"
,
node
->
nodeType
);
hr
=
WsReadNode
(
reader
,
NULL
);
ok
(
hr
==
WS_E_INVALID_FORMAT
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetDictionary
(
0
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
...
...
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