From 5b875e848774923dc4f5b22b8d28f689c70cd120 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Tue, 23 Sep 2014 04:40:05 +0000 Subject: tests: Add one more XPath optimization test git-svn-id: https://pugixml.googlecode.com/svn/trunk@1022 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_xpath_paths.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test_xpath_paths.cpp') diff --git a/tests/test_xpath_paths.cpp b/tests/test_xpath_paths.cpp index 1f81d62..40bd68c 100644 --- a/tests/test_xpath_paths.cpp +++ b/tests/test_xpath_paths.cpp @@ -522,4 +522,13 @@ TEST_XML(xpath_paths_descendant_filters, "") +{ + CHECK_XPATH_NODESET(doc, STR("//para")) % 3 % 4 % 5 % 6 % 7 % 8; + CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()/child::para")) % 3 % 4 % 5 % 6 % 7 % 8; + CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()[name()='para']/child::para")) % 4 % 5 % 6 % 7; + CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()[name()='para']/child::para[1]")) % 4 % 7; + CHECK_XPATH_NODESET(doc, STR("/descendant-or-self::node()[3]/child::para")) % 4 % 5 % 6; +} + #endif -- cgit v1.2.3