diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/ref/a.xml | 2 | ||||
| -rw-r--r-- | test/tests.cc | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/test/ref/a.xml b/test/ref/a.xml index 0a37114..e854aae 100644 --- a/test/ref/a.xml +++ b/test/ref/a.xml @@ -5,4 +5,6 @@ <E>yes</E> <F>1</F> <F>2</F> + <H><I>testing</I><I>more testing</I></H> + <J><K>jim</K></J> </A> diff --git a/test/tests.cc b/test/tests.cc index ed8d2f4..90b31cb 100644 --- a/test/tests.cc +++ b/test/tests.cc @@ -61,9 +61,16 @@ BOOST_AUTO_TEST_CASE (test) BOOST_CHECK (document.optional_bool_child("E")); BOOST_CHECK_EQUAL (document.optional_bool_child("E").get(), true); BOOST_CHECK_THROW (document.optional_bool_child("F"), cxml::Error); - BOOST_CHECK (!document.optional_bool_child("G")); BOOST_CHECK_EQUAL (document.node_children("F").size(), 2); BOOST_CHECK_EQUAL (document.node_children("F").front()->content(), "1"); BOOST_CHECK_EQUAL (document.node_children("F").back()->content(), "2"); + + BOOST_CHECK (!document.optional_bool_child("G")); + + BOOST_CHECK_EQUAL (document.node_children("H/I").size(), 2); + BOOST_CHECK_EQUAL (document.node_children("H/I").front()->content(), "testing"); + BOOST_CHECK_EQUAL (document.node_children("H/I").back()->content(), "more testing"); + + BOOST_CHECK_EQUAL (document.string_child("J/K"), "jim"); } |
