From e9956ae3a6593efc6f8cb344a00432ece51d1574 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 17 Nov 2014 19:52:23 -0800 Subject: Rename xml_document::load to load_string This should completely eliminate the confusion between load and load_file. Of course, for compatibility reasons we have to preserve the old variant - it will be deprecated in a future version and subsequently removed. --- tests/test_parse_doctype.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/test_parse_doctype.cpp') diff --git a/tests/test_parse_doctype.cpp b/tests/test_parse_doctype.cpp index f8619fd..14268f6 100644 --- a/tests/test_parse_doctype.cpp +++ b/tests/test_parse_doctype.cpp @@ -20,7 +20,7 @@ static xml_parse_result load_concat(xml_document& doc, const char_t* a, const ch strcat(buffer, c); #endif - return doc.load(buffer, parse_fragment); + return doc.load_string(buffer, parse_fragment); } static bool test_doctype_wf(const char_t* decl) @@ -41,7 +41,7 @@ static bool test_doctype_wf(const char_t* decl) if (!load_concat(doc, STR(""), decl, STR("")) || !test_node(doc, STR(""), STR(""), format_raw)) return false; // check load-store contents preservation - CHECK(doc.load(decl, parse_doctype | parse_fragment)); + CHECK(doc.load_string(decl, parse_doctype | parse_fragment)); CHECK_NODE(doc, decl); return true; @@ -281,8 +281,8 @@ TEST(parse_doctype_xmlconf_oasis_1) // not actually a doctype :) xml_document doc; - CHECK(doc.load(STR(" "), parse_full | parse_fragment) && doc.first_child().type() == node_comment && doc.last_child().type() == node_comment && doc.first_child().next_sibling() == doc.last_child()); - CHECK(doc.load(STR(" &a%b&#c?>"), parse_full | parse_fragment) && doc.first_child().type() == node_pi && doc.first_child() == doc.last_child()); + CHECK(doc.load_string(STR(" "), parse_full | parse_fragment) && doc.first_child().type() == node_comment && doc.last_child().type() == node_comment && doc.first_child().next_sibling() == doc.last_child()); + CHECK(doc.load_string(STR(" &a%b&#c?>"), parse_full | parse_fragment) && doc.first_child().type() == node_pi && doc.first_child() == doc.last_child()); } TEST(parse_doctype_xmlconf_xmltest_1) @@ -310,15 +310,15 @@ TEST_XML_FLAGS(parse_doctype_value, " ")).status == status_bad_doctype); - CHECK(doc.load(STR(""), parse_doctype).status == status_bad_doctype); + CHECK(doc.load_string(STR("")).status == status_bad_doctype); + CHECK(doc.load_string(STR(""), parse_doctype).status == status_bad_doctype); } TEST(parse_doctype_error_ignore) { xml_document doc; - CHECK(doc.load(STR("