From 1a3e92a7cc80a719efd988f14860a1aa9692d584 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Tue, 31 Jan 2017 20:36:59 -0800 Subject: tests: Add more tests to increase coverage This change adds more thorough tests for attribute conversion as well as some assorted tests that fix gaps in coverage. --- tests/test_parse.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests/test_parse.cpp') diff --git a/tests/test_parse.cpp b/tests/test_parse.cpp index fa9555d..882ba3a 100644 --- a/tests/test_parse.cpp +++ b/tests/test_parse.cpp @@ -746,6 +746,36 @@ TEST(parse_attribute_quot_inside) } } +TEST(parse_attribute_wnorm_coverage) +{ + xml_document doc; + CHECK(doc.load_string(STR(""), parse_wnorm_attribute)); + CHECK_NODE(doc, STR("")); + + CHECK(doc.load_string(STR(""), parse_wnorm_attribute | parse_escapes)); + CHECK_NODE(doc, STR("")); +} + +TEST(parse_attribute_wconv_coverage) +{ + xml_document doc; + CHECK(doc.load_string(STR(""), parse_wconv_attribute)); + CHECK_NODE(doc, STR("")); + + CHECK(doc.load_string(STR(""), parse_wconv_attribute | parse_escapes)); + CHECK_NODE(doc, STR("")); +} + +TEST(parse_attribute_eol_coverage) +{ + xml_document doc; + CHECK(doc.load_string(STR(""), parse_eol)); + CHECK_NODE(doc, STR("")); + + CHECK(doc.load_string(STR(""), parse_eol | parse_escapes)); + CHECK_NODE(doc, STR("")); +} + TEST(parse_tag_single) { xml_document doc; -- cgit v1.2.3