diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-08-29 15:45:36 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-08-29 15:45:36 +0000 |
commit | 0868f83deba4319db2f30f56ccdbc3401ce59f9a (patch) | |
tree | 9df45a243ecf6c33bf2d867c243c05764facfdac /tests/test_document.cpp | |
parent | c1bc7a30c3c2935d3739919d4f8cdb7a81fe1ee8 (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.cpp | 11 |
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"); |