diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-04-12 02:17:20 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-04-12 02:17:20 -0700 |
commit | 2537cccad34b64086ad2ff47db07c3674b9be07a (patch) | |
tree | ec6e58f10042b3c8a9da1542d890152491ed3624 /tests/test_dom_traverse.cpp | |
parent | d6f7766172bd3dcd6b286888f5bdfdcb1953f3ba (diff) |
tests: Fix some Coverity issues
Diffstat (limited to 'tests/test_dom_traverse.cpp')
-rw-r--r-- | tests/test_dom_traverse.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test_dom_traverse.cpp b/tests/test_dom_traverse.cpp index 721a079..4423dbe 100644 --- a/tests/test_dom_traverse.cpp +++ b/tests/test_dom_traverse.cpp @@ -1085,14 +1085,24 @@ TEST_XML(dom_unspecified_bool_coverage, "<node attr='value'>text</node>") { xml_node node = doc.first_child(); + CHECK(node); static_cast<void (*)(xml_node***)>(node)(0); + + CHECK(node.first_attribute()); static_cast<void (*)(xml_attribute***)>(node.first_attribute())(0); + + CHECK(node.text()); static_cast<void (*)(xml_text***)>(node.text())(0); #ifndef PUGIXML_NO_XPATH xpath_query q(STR("/node")); + CHECK(q); static_cast<void (*)(xpath_query***)>(q)(0); - static_cast<void (*)(xpath_node***)>(q.evaluate_node(doc))(0); + + xpath_node qn = q.evaluate_node(doc); + + CHECK(qn); + static_cast<void (*)(xpath_node***)>(qn)(0); #endif } |