summaryrefslogtreecommitdiff
path: root/cpp/src/tests/exception_test.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2008-04-17 21:46:22 +0000
committerAndrew Stitcher <astitcher@apache.org>2008-04-17 21:46:22 +0000
commitcfde776724c2f214b962dc8077ddca8305ddd705 (patch)
tree852a49ea858393a93886ac7dd3a5d0863ca4a935 /cpp/src/tests/exception_test.cpp
parent20e4466ca57bc7bdc81ca0857549a63c77f41d8a (diff)
downloadqpid-python-cfde776724c2f214b962dc8077ddca8305ddd705.tar.gz
Patch for improved compatibility with gcc 3.4 and boost 1.33
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@649294 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/exception_test.cpp')
-rw-r--r--cpp/src/tests/exception_test.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/cpp/src/tests/exception_test.cpp b/cpp/src/tests/exception_test.cpp
index 715cdaec2a..f7a91f662f 100644
--- a/cpp/src/tests/exception_test.cpp
+++ b/cpp/src/tests/exception_test.cpp
@@ -70,30 +70,33 @@ struct Catcher : public Runnable {
}
};
-BOOST_FIXTURE_TEST_CASE(DisconnectedPop, ProxySessionFixture) {
- ProxyConnection c(broker->getPort());
- session.queueDeclare(arg::queue="q");
- subs.subscribe(lq, "q");
- Catcher<ClosedException> pop(bind(&LocalQueue::pop, boost::ref(lq)));
- connection.proxy.close();
+QPID_AUTO_TEST_CASE(DisconnectedPop) {
+ ProxySessionFixture fix;
+ ProxyConnection c(fix.broker->getPort());
+ fix.session.queueDeclare(arg::queue="q");
+ fix.subs.subscribe(fix.lq, "q");
+ Catcher<ClosedException> pop(bind(&LocalQueue::pop, boost::ref(fix.lq)));
+ fix.connection.proxy.close();
BOOST_CHECK(pop.join());
}
-BOOST_FIXTURE_TEST_CASE(DisconnectedListen, ProxySessionFixture) {
+QPID_AUTO_TEST_CASE(DisconnectedListen) {
+ ProxySessionFixture fix;
struct NullListener : public MessageListener {
void received(Message&) { BOOST_FAIL("Unexpected message"); }
} l;
- ProxyConnection c(broker->getPort());
- session.queueDeclare(arg::queue="q");
- subs.subscribe(l, "q");
- Thread t(subs);
- connection.proxy.close();
+ ProxyConnection c(fix.broker->getPort());
+ fix.session.queueDeclare(arg::queue="q");
+ fix.subs.subscribe(l, "q");
+ Thread t(fix.subs);
+ fix.connection.proxy.close();
t.join();
- BOOST_CHECK_THROW(session.close(), InternalErrorException);
+ BOOST_CHECK_THROW(fix.session.close(), InternalErrorException);
}
-BOOST_FIXTURE_TEST_CASE(NoSuchQueueTest, ProxySessionFixture) {
- BOOST_CHECK_THROW(subs.subscribe(lq, "no such queue").sync(), NotFoundException);
+QPID_AUTO_TEST_CASE(NoSuchQueueTest) {
+ ProxySessionFixture fix;
+ BOOST_CHECK_THROW(fix.subs.subscribe(fix.lq, "no such queue").sync(), NotFoundException);
}
QPID_AUTO_TEST_SUITE_END()