mirror of
https://github.com/zeux/pugixml.git
synced 2025-01-16 12:13:24 +08:00
tests: Improve test coverage
This commit is contained in:
parent
25926c6206
commit
f68a320a02
@ -301,6 +301,10 @@ TEST(document_load_file_error)
|
|||||||
|
|
||||||
CHECK(doc.load_file("filedoesnotexist").status == status_file_not_found);
|
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;
|
test_runner::_memory_fail_threshold = 1;
|
||||||
CHECK(doc.load_file("tests/data/small.xml").status == status_out_of_memory);
|
CHECK(doc.load_file("tests/data/small.xml").status == status_out_of_memory);
|
||||||
}
|
}
|
||||||
|
@ -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-or-self::*"), true);
|
||||||
CHECK_XPATH_BOOLEAN(doc, STR("//para5/ancestor::*"), 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'/>")
|
TEST_XML(xpath_paths_null_nodeset_entries, "<node attr='value'/>")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user