summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-05 11:35:39 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-05 11:35:39 -0800
commit9749920c8204930f868fed7fcf38ea2cc2b5a2ec (patch)
treefb2ee688dcdae6b3ef24ce18017639e42f75a7c3 /tests
parent57ca94f89722937e8eb33537b0f290928d92bb7d (diff)
Refactor contents=0 behavior
Also change the error code to status_io_error
Diffstat (limited to 'tests')
-rw-r--r--tests/test_parse.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_parse.cpp b/tests/test_parse.cpp
index 500e44c..131840c 100644
--- a/tests/test_parse.cpp
+++ b/tests/test_parse.cpp
@@ -872,14 +872,16 @@ TEST(parse_load_buffer_null)
{
xml_document doc;
- CHECK(doc.load_buffer(0, 12).status == status_no_document_element && !doc.first_child());
+ 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);
+ 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)