From 3bee04cd1145802784481cd13f4a951da83ff917 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 30 May 2010 07:04:46 +0000 Subject: tests: Fixed pointer order dependency for unsorted XPath results git-svn-id: http://pugixml.googlecode.com/svn/trunk@470 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test.cpp | 3 +++ tests/test_xpath_xalan_3.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test.cpp b/tests/test.cpp index d12278b..be0d86b 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -128,6 +128,9 @@ xpath_node_set_tester::xpath_node_set_tester(const pugi::xpath_node_set& set, co { result = set; + // only sort unsorted sets so that we're able to verify reverse order for some axes + if (result.type() == pugi::xpath_node_set::type_unsorted) result.sort(); + if (result.empty()) { document_order = 0; diff --git a/tests/test_xpath_xalan_3.cpp b/tests/test_xpath_xalan_3.cpp index d1be803..e36788a 100644 --- a/tests/test_xpath_xalan_3.cpp +++ b/tests/test_xpath_xalan_3.cpp @@ -59,7 +59,7 @@ TEST_XML_FLAGS(xpath_xalan_axes_2, " Level-1