summaryrefslogtreecommitdiff
path: root/tests/test_xpath_paths.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-10-05 04:20:52 +0000
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-10-05 04:20:52 +0000
commitb17501c3fb01530aae790228850ac6122227d8a8 (patch)
tree0dec0d7d15e82eb6d109966e9ba0a9eacb2743cb /tests/test_xpath_paths.cpp
parenta3b23751aeb6c9e84829010e20b44545ef4da9ff (diff)
tests: Add XPath sorting tests and a simple test for numeric predicates
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1051 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_xpath_paths.cpp')
-rw-r--r--tests/test_xpath_paths.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_xpath_paths.cpp b/tests/test_xpath_paths.cpp
index 40bd68c..45579a9 100644
--- a/tests/test_xpath_paths.cpp
+++ b/tests/test_xpath_paths.cpp
@@ -531,4 +531,12 @@ TEST_XML(xpath_paths_descendant_optimize, "<node><para><para/><para/><para><para
CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()[3]/child::para")) % 4 % 5 % 6;
}
+TEST_XML(xpath_paths_precision, "<node><para/><para/><para/><para/><para/></node>")
+{
+ CHECK_XPATH_NODESET(doc, STR("//para[1]")) % 3;
+ CHECK_XPATH_NODESET(doc, STR("//para[3 div 3]")) % 3;
+ CHECK_XPATH_NODESET(doc, STR("//para[6 div 3 - 1]")) % 3;
+ CHECK_XPATH_NODESET(doc, STR("//para[6 * (1 div 3) - 1]")) % 3;
+}
+
#endif