diff options
author | Aidan Skinner <aidan@apache.org> | 2009-09-17 16:21:13 +0000 |
---|---|---|
committer | Aidan Skinner <aidan@apache.org> | 2009-09-17 16:21:13 +0000 |
commit | 7d6a028be9f6c47418e98a6fa74a359864428150 (patch) | |
tree | 78083427e88c48edb3b23605309e57f1301cba19 /qpid/cpp/src/tests/QueueOptionsTest.cpp | |
parent | 31bbc100ac6b3a31eb25d29f407d60ff23334d1f (diff) | |
download | qpid-python-7d6a028be9f6c47418e98a6fa74a359864428150.tar.gz |
Merge from trunk
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/java-network-refactor@816261 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/QueueOptionsTest.cpp')
-rw-r--r-- | qpid/cpp/src/tests/QueueOptionsTest.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/qpid/cpp/src/tests/QueueOptionsTest.cpp b/qpid/cpp/src/tests/QueueOptionsTest.cpp index 93d1961caa..f2fbaba2c1 100644 --- a/qpid/cpp/src/tests/QueueOptionsTest.cpp +++ b/qpid/cpp/src/tests/QueueOptionsTest.cpp @@ -7,9 +7,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -27,14 +27,17 @@ using namespace qpid::client; +namespace qpid { +namespace tests { + QPID_AUTO_TEST_SUITE(QueueOptionsTestSuite) QPID_AUTO_TEST_CASE(testSizePolicy) { QueueOptions ft; - + ft.setSizePolicy(REJECT,1,2); - + BOOST_CHECK(QueueOptions::strREJECT == ft.getAsString(QueueOptions::strTypeKey)); BOOST_CHECK(1 == ft.getAsInt(QueueOptions::strMaxSizeKey)); BOOST_CHECK(2 == ft.getAsInt(QueueOptions::strMaxCountKey)); @@ -49,7 +52,7 @@ QPID_AUTO_TEST_CASE(testSizePolicy) ft.setSizePolicy(RING_STRICT,1,0); BOOST_CHECK(QueueOptions::strRING_STRICT == ft.getAsString(QueueOptions::strTypeKey)); - + ft.clearSizePolicy(); BOOST_CHECK(!ft.isSet(QueueOptions::strTypeKey)); BOOST_CHECK(!ft.isSet(QueueOptions::strMaxSizeKey)); @@ -59,13 +62,13 @@ QPID_AUTO_TEST_CASE(testSizePolicy) QPID_AUTO_TEST_CASE(testFlags) { QueueOptions ft; - + ft.setPersistLastNode(); ft.setOrdering(LVQ); - + BOOST_CHECK(1 == ft.getAsInt(QueueOptions::strPersistLastNode)); BOOST_CHECK(1 == ft.getAsInt(QueueOptions::strLastValueQueue)); - + ft.clearPersistLastNode(); ft.setOrdering(FIFO); @@ -78,8 +81,8 @@ QPID_AUTO_TEST_CASE(testSetOrdering) { //ensure setOrdering(FIFO) works even if not preceded by a call to //setOrdering(LVQ) - QueueOptions ft; - ft.setOrdering(FIFO); + QueueOptions ft; + ft.setOrdering(FIFO); BOOST_CHECK(!ft.isSet(QueueOptions::strLastValueQueue)); } @@ -88,10 +91,12 @@ QPID_AUTO_TEST_CASE(testClearPersistLastNode) { //ensure clear works even if not preceded by the setting on the //option - QueueOptions ft; + QueueOptions ft; ft.clearPersistLastNode(); BOOST_CHECK(!ft.isSet(QueueOptions::strPersistLastNode)); } QPID_AUTO_TEST_SUITE_END() + +}} // namespace qpid::tests |