diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-02-05 21:34:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-05 21:34:54 -0800 |
commit | a9fe2bb62e0976ab74fdb5266cc3725250eca075 (patch) | |
tree | 85c96e92afb2e3437b0eb20c805227b91e5e69f2 /tests/test_xpath_operators.cpp | |
parent | d3b9e4e1e85d0aca562d0e6b62533e68e5a4a749 (diff) | |
parent | 10676b6b8548ddbf9458993062e6a27c2c233d48 (diff) |
Merge pull request #131 from zeux/xpath-noeh
XPath: Remove exceptional control flow
Diffstat (limited to 'tests/test_xpath_operators.cpp')
-rw-r--r-- | tests/test_xpath_operators.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_xpath_operators.cpp b/tests/test_xpath_operators.cpp index 1a97c7d..c2281e6 100644 --- a/tests/test_xpath_operators.cpp +++ b/tests/test_xpath_operators.cpp @@ -332,11 +332,21 @@ TEST_XML(xpath_operators_inequality_node_set_node_set, "<node><c1><v>1</v><v>-1< CHECK_XPATH_BOOLEAN(n, STR("c1/v < c3/v"), true); CHECK_XPATH_BOOLEAN(n, STR("c1/v <= c3/v"), true); + CHECK_XPATH_BOOLEAN(n, STR("c1/v[1] > c1/v[1]"), false); + CHECK_XPATH_BOOLEAN(n, STR("c1/v[1] < c1/v[1]"), false); + CHECK_XPATH_BOOLEAN(n, STR("c1/v[1] >= c1/v[1]"), true); + CHECK_XPATH_BOOLEAN(n, STR("c1/v[1] <= c1/v[1]"), true); + #ifndef MSVC6_NAN_BUG CHECK_XPATH_BOOLEAN(n, STR("c1/v > c2/v"), false); CHECK_XPATH_BOOLEAN(n, STR("c1/v >= c2/v"), true); CHECK_XPATH_BOOLEAN(n, STR("c1/v < c2/v"), true); CHECK_XPATH_BOOLEAN(n, STR("c1/v <= c2/v"), true); + + CHECK_XPATH_BOOLEAN(n, STR("c2/v[2] < c2/v[2]"), false); + CHECK_XPATH_BOOLEAN(n, STR("c2/v[2] > c2/v[2]"), false); + CHECK_XPATH_BOOLEAN(n, STR("c2/v[2] <= c2/v[2]"), false); + CHECK_XPATH_BOOLEAN(n, STR("c2/v[2] >= c2/v[2]"), false); #endif } |