mirror of
https://github.com/zeux/pugixml.git
synced 2025-01-14 01:47:55 +08:00
tests: Fixed pointer order dependency for unsorted XPath results
git-svn-id: http://pugixml.googlecode.com/svn/trunk@470 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
0a50eccd4e
commit
3bee04cd11
@ -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;
|
||||
|
@ -59,7 +59,7 @@ TEST_XML_FLAGS(xpath_xalan_axes_2, "<far-north> Level-1<north-north-west1/><nort
|
||||
CHECK_XPATH_NODESET(center, STR("@*/self::node()")) % 21 % 22 % 23;
|
||||
CHECK_XPATH_NODESET(center, STR("@*/.")) % 21 % 22 % 23;
|
||||
CHECK_XPATH_NODESET(center, STR("@*/descendant-or-self::node()")) % 21 % 22 % 23;
|
||||
CHECK_XPATH_NODESET(center, STR("@*/ancestor-or-self::*")) % 21 % 22 % 23 % 2 % 9 % 13 % 20;
|
||||
CHECK_XPATH_NODESET(center, STR("@*/ancestor-or-self::*")) % 2 % 9 % 13 % 20 % 21 % 22 % 23;
|
||||
CHECK_XPATH_NODESET(center, STR("@*/preceding-sibling::node()"));
|
||||
CHECK_XPATH_NODESET(center, STR("@*/following-sibling::*"));
|
||||
CHECK_XPATH_NODESET(center, STR("@*/ancestor::*/near-north/*[4]/@*/preceding::*")) % 4 % 5 % 14 % 15 % 16;
|
||||
|
Loading…
x
Reference in New Issue
Block a user