tests: Move null buffer tests to test_document
Remove size=0 test since a better test is already there.
This commit is contained in:
parent
9749920c82
commit
12e137d12f
2 changed files with 11 additions and 16 deletions
|
@ -990,6 +990,17 @@ TEST(document_load_buffer_empty_fragment)
|
|||
}
|
||||
}
|
||||
|
||||
TEST(document_load_buffer_null)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
CHECK(doc.load_buffer(0, 12).status == status_io_error && !doc.first_child());
|
||||
CHECK(doc.load_buffer(0, 12, parse_fragment).status == status_io_error && !doc.first_child());
|
||||
|
||||
CHECK(doc.load_buffer_inplace(0, 12).status == status_io_error && !doc.first_child());
|
||||
CHECK(doc.load_buffer_inplace_own(0, 12).status == status_io_error && !doc.first_child());
|
||||
}
|
||||
|
||||
TEST(document_progressive_truncation)
|
||||
{
|
||||
char* original_data;
|
||||
|
|
|
@ -868,22 +868,6 @@ TEST(parse_empty)
|
|||
CHECK(doc.load_string(STR(""), parse_fragment) && !doc.first_child());
|
||||
}
|
||||
|
||||
TEST(parse_load_buffer_null)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
CHECK(doc.load_buffer(0, 12).status == status_io_error && !doc.first_child());
|
||||
CHECK(doc.load_buffer(0, 12, parse_fragment).status == status_io_error && !doc.first_child());
|
||||
}
|
||||
|
||||
TEST(parse_load_buffer_empty)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
CHECK(doc.load_buffer("foo", 0).status == status_no_document_element && !doc.first_child());
|
||||
CHECK(doc.load_buffer("foo", 0, parse_fragment) && !doc.first_child());
|
||||
}
|
||||
|
||||
TEST(parse_out_of_memory)
|
||||
{
|
||||
test_runner::_memory_fail_threshold = 256;
|
||||
|
|
Loading…
Add table
Reference in a new issue