diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-01-30 21:36:05 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-01-30 21:58:48 -0800 |
commit | 02cee98492233f4ae91f025fc38f9df8b4bc0efe (patch) | |
tree | d862fa9912ff932b4b4b52a7932d6ae1c814979b /tests/test_xpath_parse.cpp | |
parent | cac1d8ad9f602e74841acb05596396ee00994ebb (diff) |
tests: Add more tests for branch coverage
gcov -b surfaced many lines with partial coverage, where branch is only
ever taken or not taken, or one of the expressions in a complex
conditional is always either true or false. This change adds a series of
tests (mostly focusing on XPath) to reduce the number of partially
covered lines.
Diffstat (limited to 'tests/test_xpath_parse.cpp')
-rw-r--r-- | tests/test_xpath_parse.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_xpath_parse.cpp b/tests/test_xpath_parse.cpp index 1f51118..c39481b 100644 --- a/tests/test_xpath_parse.cpp +++ b/tests/test_xpath_parse.cpp @@ -335,4 +335,12 @@ TEST(xpath_parse_error_propagation) } } +TEST_XML(xpath_parse_location_path, "<node><child/></node>") +{ + CHECK_XPATH_NODESET(doc, STR("/node")) % 2; + CHECK_XPATH_NODESET(doc, STR("/@*")); + CHECK_XPATH_NODESET(doc, STR("/.")) % 1; + CHECK_XPATH_NODESET(doc, STR("/..")); + CHECK_XPATH_NODESET(doc, STR("/*")) % 2; +} #endif |