summaryrefslogtreecommitdiff
path: root/tests/test_parse.cpp
diff options
context:
space:
mode:
authormloy <matthias.loy@googlemail.com>2014-10-30 14:30:05 +0100
committermloy <matthias.loy@googlemail.com>2014-10-30 14:30:05 +0100
commit837ced350c5123c21c32154f1f2dc483238f7629 (patch)
tree62f6397744c3e4cc9bb6d13d803069349736273b /tests/test_parse.cpp
parent21cff3bca2055587f7a6a85a8cc7691111d43c50 (diff)
load_buffer_impl always checks if buffer is valid pointer and size > 0
added some tests to force invalid buffer and size = 0
Diffstat (limited to 'tests/test_parse.cpp')
-rw-r--r--tests/test_parse.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_parse.cpp b/tests/test_parse.cpp
index c45b783..56ea049 100644
--- a/tests/test_parse.cpp
+++ b/tests/test_parse.cpp
@@ -865,6 +865,8 @@ TEST(parse_empty)
xml_document doc;
CHECK(doc.load(STR("")).status == status_no_document_element && !doc.first_child());
CHECK(doc.load(STR(""), parse_fragment) && !doc.first_child());
+ CHECK(doc.load_buffer(NULL, 12).status == status_no_document_element);
+ CHECK(doc.load_buffer("foo", 0).status == status_no_document_element);
}
TEST(parse_out_of_memory)