summaryrefslogtreecommitdiff
path: root/tests/test.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-30 07:04:46 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-30 07:04:46 +0000
commit3bee04cd1145802784481cd13f4a951da83ff917 (patch)
tree52376eb14c83407f9b5763b83a433ca9c07089e1 /tests/test.cpp
parent0a50eccd4e7c08814e7b982798b1c1346c304939 (diff)
tests: Fixed pointer order dependency for unsorted XPath results
git-svn-id: http://pugixml.googlecode.com/svn/trunk@470 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test.cpp')
-rw-r--r--tests/test.cpp3
1 files changed, 3 insertions, 0 deletions
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;