diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2015-09-04 17:47:35 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2015-09-04 17:47:35 +0000 |
| commit | c7500cc5473ab365363527498350abc975fabd67 (patch) | |
| tree | 9ddd8844e657abb017c6905283cd1f6ee48c325c /qpid/cpp/src/tests | |
| parent | 215baaf0af925fc020cc89a77092252f6061854d (diff) | |
| download | qpid-python-c7500cc5473ab365363527498350abc975fabd67.tar.gz | |
QPID-6717: Change Selector beaviour and tests to accord with consensus semantics
- It seems to be the consensus amongst JMS Selector implementations that
the NOT IN expression should return false if none of the types match
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1701301 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rw-r--r-- | qpid/cpp/src/tests/Selector.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/Selector.cpp b/qpid/cpp/src/tests/Selector.cpp index d512476f8b..6995420f17 100644 --- a/qpid/cpp/src/tests/Selector.cpp +++ b/qpid/cpp/src/tests/Selector.cpp @@ -450,11 +450,19 @@ QPID_AUTO_TEST_CASE(comparisonEval) BOOST_CHECK(qb::Selector("20 >= 19.0 and 20 > 19").eval(env)); BOOST_CHECK(qb::Selector("42 <= 42.0 and 37.0 >= 37").eval(env)); BOOST_CHECK(qb::Selector("(A IN ('hello', 'there', 1 , true, (1-17))) IS NULL").eval(env)); + BOOST_CHECK(qb::Selector("(-16 IN ('hello', A, 'there', true)) IS NULL").eval(env)); + BOOST_CHECK(qb::Selector("(-16 NOT IN ('hello', 'there', A, true)) IS NULL").eval(env)); + BOOST_CHECK(qb::Selector("(-16 IN ('hello', 'there', true)) IS NOT NULL").eval(env)); + BOOST_CHECK(!qb::Selector("-16 IN ('hello', 'there', true)").eval(env)); + BOOST_CHECK(qb::Selector("(-16 NOT IN ('hello', 'there', true)) IS NOT NULL").eval(env)); + BOOST_CHECK(!qb::Selector("-16 NOT IN ('hello', 'there', true)").eval(env)); + BOOST_CHECK(qb::Selector("(-16 NOT IN ('hello', 'there', A, 1 , true)) IS NULL").eval(env)); BOOST_CHECK(qb::Selector("'hello' IN ('hello', 'there', 1 , true, (1-17))").eval(env)); BOOST_CHECK(qb::Selector("TRUE IN ('hello', 'there', 1 , true, (1-17))").eval(env)); BOOST_CHECK(qb::Selector("-16 IN ('hello', 'there', 1 , true, (1-17))").eval(env)); + BOOST_CHECK(!qb::Selector("-16 NOT IN ('hello', 'there', 1 , true, (1-17))").eval(env)); BOOST_CHECK(!qb::Selector("1 IN ('hello', 'there', 'polly')").eval(env)); - BOOST_CHECK(qb::Selector("1 NOT IN ('hello', 'there', 'polly')").eval(env)); + BOOST_CHECK(!qb::Selector("1 NOT IN ('hello', 'there', 'polly')").eval(env)); BOOST_CHECK(!qb::Selector("'hell' IN ('hello', 'there', 1 , true, (1-17))").eval(env)); BOOST_CHECK(qb::Selector("('hell' IN ('hello', 'there', 1 , true, (1-17), A)) IS NULL").eval(env)); BOOST_CHECK(qb::Selector("('hell' NOT IN ('hello', 'there', 1 , true, (1-17), A)) IS NULL").eval(env)); |
