summaryrefslogtreecommitdiff
path: root/tests/test_document.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:45:36 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:45:36 +0000
commit0868f83deba4319db2f30f56ccdbc3401ce59f9a (patch)
tree9df45a243ecf6c33bf2d867c243c05764facfdac /tests/test_document.cpp
parentc1bc7a30c3c2935d3739919d4f8cdb7a81fe1ee8 (diff)
tests: Removed some deprecated tests, minor coverage improvements
git-svn-id: http://pugixml.googlecode.com/svn/trunk@687 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_document.cpp')
-rw-r--r--tests/test_document.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index 37ec021..bb86992 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -267,6 +267,17 @@ TEST_XML(document_save_declaration, "<node/>")
CHECK(writer.as_string() == STR("<?xml version=\"1.0\"?>\n<node />\n"));
}
+TEST(document_save_declaration_empty)
+{
+ xml_document doc;
+
+ xml_writer_string writer;
+
+ doc.save(writer, STR(""), pugi::format_default, get_native_encoding());
+
+ CHECK(writer.as_string() == STR("<?xml version=\"1.0\"?>\n"));
+}
+
TEST_XML(document_save_declaration_present_first, "<node/>")
{
doc.insert_child_before(node_declaration, doc.first_child()).append_attribute(STR("encoding")) = STR("utf8");