diff options
| author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-03-10 20:44:06 -0700 | 
|---|---|---|
| committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-03-10 20:44:06 -0700 | 
| commit | f81d7cc0184b1586270ecf41386d98942df3cf99 (patch) | |
| tree | 8d3e5a7d5880d02c6af2fdaa8f97e23035ad66e7 /tests/test_document.cpp | |
| parent | e5ecbd63ce75de0a8f1473cbe0c1f9eea657dd02 (diff) | |
| parent | 604861e520d2d6579674a1c2bd5e59cb10f7ecd2 (diff) | |
Merge branch 'master' into compact
Diffstat (limited to 'tests/test_document.cpp')
| -rw-r--r-- | tests/test_document.cpp | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/tests/test_document.cpp b/tests/test_document.cpp index ebcdcd1..49428f2 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -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; | 
