From 02cee98492233f4ae91f025fc38f9df8b4bc0efe Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 30 Jan 2017 21:36:05 -0800 Subject: tests: Add more tests for branch coverage gcov -b surfaced many lines with partial coverage, where branch is only ever taken or not taken, or one of the expressions in a complex conditional is always either true or false. This change adds a series of tests (mostly focusing on XPath) to reduce the number of partially covered lines. --- tests/test_document.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test_document.cpp') diff --git a/tests/test_document.cpp b/tests/test_document.cpp index c7219e1..95bd873 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -496,6 +496,15 @@ TEST_XML(document_save_declaration_latin1, "") CHECK(writer.as_narrow() == "\n\n"); } +TEST_XML(document_save_declaration_raw, "") +{ + xml_writer_string writer; + + doc.save(writer, STR(""), pugi::format_raw, get_native_encoding()); + + CHECK(writer.as_string() == STR("")); +} + struct temp_file { char path[512]; -- cgit v1.2.3