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
538bc11b
Commit
538bc11b
authored
Sep 15, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/tests: Add a test for IsEmptyElement() on attributes.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
fdbbf6de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
reader.c
dlls/xmllite/tests/reader.c
+19
-3
No files found.
dlls/xmllite/tests/reader.c
View file @
538bc11b
...
...
@@ -1833,16 +1833,15 @@ static void test_isemptyelement(void)
{
struct
test_entry_empty
*
test
=
empty_element_tests
;
IXmlReader
*
reader
;
XmlNodeType
type
;
HRESULT
hr
;
BOOL
ret
;
hr
=
CreateXmlReader
(
&
IID_IXmlReader
,
(
void
**
)
&
reader
,
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
while
(
test
->
xml
)
{
XmlNodeType
type
;
BOOL
ret
;
set_input_string
(
reader
,
test
->
xml
);
type
=
XmlNodeType_None
;
...
...
@@ -1856,6 +1855,23 @@ static void test_isemptyelement(void)
test
++
;
}
/* Move to an attribute of an empty element. */
set_input_string
(
reader
,
"<a attr1=
\'
b
\'
/>"
);
hr
=
IXmlReader_Read
(
reader
,
&
type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_Element
,
"Unexpected node type %d.
\n
"
,
type
);
ret
=
IXmlReader_IsEmptyElement
(
reader
);
ok
(
ret
,
"Unexpected empty flag %d.
\n
"
,
ret
);
hr
=
IXmlReader_MoveToFirstAttribute
(
reader
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IXmlReader_GetNodeType
(
reader
,
&
type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_Attribute
,
"Unexpected node type %d.
\n
"
,
type
);
ret
=
IXmlReader_IsEmptyElement
(
reader
);
ok
(
!
ret
,
"Unexpected empty flag %d.
\n
"
,
ret
);
IXmlReader_Release
(
reader
);
}
...
...
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