From fc602fd37554f5e2d58fcee71a58e380d23d22d4 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Thu, 29 Oct 2009 07:17:30 +0000 Subject: tests: Supported all pugixml compilation modes git-svn-id: http://pugixml.googlecode.com/svn/trunk@191 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_dom_traverse.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/test_dom_traverse.cpp') diff --git a/tests/test_dom_traverse.cpp b/tests/test_dom_traverse.cpp index ab3ed35..eef3e83 100644 --- a/tests/test_dom_traverse.cpp +++ b/tests/test_dom_traverse.cpp @@ -8,11 +8,20 @@ #pragma warning(disable: 4996) #endif +#ifdef PUGIXML_NO_STL +template static I move_iter(I base, int n) +{ + if (n > 0) while (n--) ++base; + else while (n++) --base; + return base; +} +#else template static I move_iter(I base, int n) { std::advance(base, n); return base; } +#endif template static void generic_bool_ops_test(const T& obj) { @@ -566,6 +575,7 @@ TEST_XML(dom_node_find_node, "") CHECK(doc.find_node(find_predicate_prefix("child3")) == xml_node()); } +#ifndef PUGIXML_NO_STL TEST_XML(dom_node_path, "text") { CHECK(xml_node().path() == ""); @@ -578,6 +588,7 @@ TEST_XML(dom_node_path, "text") CHECK(doc.child("node").child("child1").path('\\') == "\\node\\child1"); } +#endif TEST_XML(dom_node_first_element_by_path, "text") { @@ -591,7 +602,10 @@ TEST_XML(dom_node_first_element_by_path, "text