summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-01 11:45:13 +0100
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-01 11:45:13 +0100
commitf68a320a0203279db2e8692cc9e21f71551454e4 (patch)
treeaa9c1421fb15d6698fb3717e39e67644c24ded90 /tests
parent25926c6206a47ffb5cbfb3702e2df22038176205 (diff)
tests: Improve test coverage
Diffstat (limited to 'tests')
-rw-r--r--tests/test_document.cpp4
-rw-r--r--tests/test_xpath_paths.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index 2cc39a6..2774a07 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -301,6 +301,10 @@ TEST(document_load_file_error)
CHECK(doc.load_file("filedoesnotexist").status == status_file_not_found);
+#ifndef _WIN32
+ CHECK(doc.load_file("/dev/tty").status == status_io_error);
+#endif
+
test_runner::_memory_fail_threshold = 1;
CHECK(doc.load_file("tests/data/small.xml").status == status_out_of_memory);
}
diff --git a/tests/test_xpath_paths.cpp b/tests/test_xpath_paths.cpp
index df0dfa4..e51a395 100644
--- a/tests/test_xpath_paths.cpp
+++ b/tests/test_xpath_paths.cpp
@@ -664,6 +664,8 @@ TEST_XML(xpath_paths_optimize_step_once, "<node><para1><para2/><para3/><para4><p
CHECK_XPATH_BOOLEAN(doc, STR("//para5/ancestor-or-self::*"), true);
CHECK_XPATH_BOOLEAN(doc, STR("//para5/ancestor::*"), true);
+
+ CHECK_XPATH_BOOLEAN(doc, STR("//@attr5/ancestor-or-self::node()"), true);
}
TEST_XML(xpath_paths_null_nodeset_entries, "<node attr='value'/>")