summaryrefslogtreecommitdiff
path: root/tests/test_parse_doctype.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-10 21:36:05 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-10 21:36:05 +0000
commit157f720e12eb687235d86bbc53cf6c3d240770f1 (patch)
treebaefc44432f8f4943fb0c51e4feaa106c23bceab /tests/test_parse_doctype.cpp
parent4eccdbb8dcbffe8c5028a3f69f7661d95e11d44a (diff)
Various test compilation fixes
git-svn-id: http://pugixml.googlecode.com/svn/trunk@414 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_parse_doctype.cpp')
-rw-r--r--tests/test_parse_doctype.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/test_parse_doctype.cpp b/tests/test_parse_doctype.cpp
index 2df51a0..5ab8140 100644
--- a/tests/test_parse_doctype.cpp
+++ b/tests/test_parse_doctype.cpp
@@ -2,30 +2,30 @@
#include <string>
-bool test_doctype_wf(const std::basic_string<char_t>& decl)
+static bool test_doctype_wf(const std::basic_string<char_t>& decl)
{
xml_document doc;
// standalone
- if (!doc.load(decl.c_str()) || doc.first_child()) return false;
+ if (!doc.load(decl.c_str()) || (bool)doc.first_child()) return false;
// pcdata pre/postfix
- if (!doc.load(("a" + decl).c_str()) || doc.first_child()) return false;
- if (!doc.load((decl + "b").c_str()) || doc.first_child()) return false;
- if (!doc.load(("a" + decl + "b").c_str()) || doc.first_child()) return false;
+ if (!doc.load((STR("a") + decl).c_str()) || (bool)doc.first_child()) return false;
+ if (!doc.load((decl + STR("b")).c_str()) || (bool)doc.first_child()) return false;
+ if (!doc.load((STR("a") + decl + STR("b")).c_str()) || (bool)doc.first_child()) return false;
// node pre/postfix
- if (!doc.load(("<nodea/>" + decl).c_str()) || !test_node(doc, STR("<nodea />"), STR(""), format_raw)) return false;
- if (!doc.load((decl + "<nodeb/>").c_str()) || !test_node(doc, STR("<nodeb />"), STR(""), format_raw)) return false;
- if (!doc.load(("<nodea/>" + decl + "<nodeb/>").c_str()) || !test_node(doc, STR("<nodea /><nodeb />"), STR(""), format_raw)) return false;
+ if (!doc.load((STR("<nodea/>") + decl).c_str()) || !test_node(doc, STR("<nodea />"), STR(""), format_raw)) return false;
+ if (!doc.load((decl + STR("<nodeb/>")).c_str()) || !test_node(doc, STR("<nodeb />"), STR(""), format_raw)) return false;
+ if (!doc.load((STR("<nodea/>") + decl + STR("<nodeb/>")).c_str()) || !test_node(doc, STR("<nodea /><nodeb />"), STR(""), format_raw)) return false;
// wrap in node to check that doctype is parsed fully (does not leave any "pcdata")
- if (!doc.load(("<node>" + decl + "</node>").c_str()) || !test_node(doc, STR("<node />"), STR(""), format_raw)) return false;
+ if (!doc.load((STR("<node>") + decl + STR("</node>")).c_str()) || !test_node(doc, STR("<node />"), STR(""), format_raw)) return false;
return true;
}
-bool test_doctype_nwf(const std::basic_string<char_t>& decl)
+static bool test_doctype_nwf(const std::basic_string<char_t>& decl)
{
xml_document doc;
@@ -33,10 +33,10 @@ bool test_doctype_nwf(const std::basic_string<char_t>& decl)
if (doc.load(decl.c_str()).status != status_bad_doctype) return false;
// pcdata postfix
- if (doc.load((decl + "b").c_str()).status != status_bad_doctype) return false;
+ if (doc.load((decl + STR("b")).c_str()).status != status_bad_doctype) return false;
// node postfix
- if (doc.load((decl + "<nodeb/>").c_str()).status != status_bad_doctype) return false;
+ if (doc.load((decl + STR("<nodeb/>")).c_str()).status != status_bad_doctype) return false;
return true;
}