diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2014-07-03 20:25:28 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2014-07-03 20:25:28 +0000 |
| commit | 29481e51fdbd1a87c7ec75eac8e60ba93028e123 (patch) | |
| tree | 60c9dd1d9d2faa68e2e2ab189e3b276a244d2ddc /qpid/cpp/src/tests | |
| parent | b5b5670d078966443c04f60f64e9b39ad6630cb5 (diff) | |
| download | qpid-python-29481e51fdbd1a87c7ec75eac8e60ba93028e123.tar.gz | |
QPID-5874: Treat all empty selectors sensibly
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1607739 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rw-r--r-- | qpid/cpp/src/tests/Selector.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/Selector.cpp b/qpid/cpp/src/tests/Selector.cpp index 23c192bc63..73af1a9623 100644 --- a/qpid/cpp/src/tests/Selector.cpp +++ b/qpid/cpp/src/tests/Selector.cpp @@ -151,6 +151,7 @@ void verifyTokeniserFail(TokeniseF t, const char* c) { QPID_AUTO_TEST_CASE(tokeniseSuccess) { verifyTokeniserSuccess(&tokenise, "", qb::T_EOS, "", ""); + verifyTokeniserSuccess(&tokenise, " ", qb::T_EOS, "", ""); verifyTokeniserSuccess(&tokenise, "null_123+blah", qb::T_IDENTIFIER, "null_123", "+blah"); verifyTokeniserSuccess(&tokenise, "\"null-123\"+blah", qb::T_IDENTIFIER, "null-123", "+blah"); verifyTokeniserSuccess(&tokenise, "\"This is an \"\"odd!\"\" identifier\"+blah", qb::T_IDENTIFIER, "This is an \"odd!\" identifier", "+blah"); @@ -344,6 +345,8 @@ QPID_AUTO_TEST_CASE(simpleEval) env.set("A", "Bye, bye cruel world"); env.set("B", "hello kitty"); + BOOST_CHECK(qb::Selector("").eval(env)); + BOOST_CHECK(qb::Selector(" ").eval(env)); BOOST_CHECK(qb::Selector("A is not null").eval(env)); BOOST_CHECK(!qb::Selector("A is null").eval(env)); BOOST_CHECK(!qb::Selector("A = C").eval(env)); |
