diff options
author | Alan Conway <aconway@apache.org> | 2008-06-12 19:57:04 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-06-12 19:57:04 +0000 |
commit | 21e884491096b47dc3771c26aa40b41ed1f8ace2 (patch) | |
tree | f3b56e4d185e154e9dd4390129ec1a7865b79516 /cpp/src/tests/exception_test.cpp | |
parent | c3c98db893d6e127dc5e0037fb2c3548e8f90a5a (diff) | |
download | qpid-python-21e884491096b47dc3771c26aa40b41ed1f8ace2.tar.gz |
Fix test error.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@667215 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/exception_test.cpp')
-rw-r--r-- | cpp/src/tests/exception_test.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/src/tests/exception_test.cpp b/cpp/src/tests/exception_test.cpp index a656e0cf1a..1cbe35fff4 100644 --- a/cpp/src/tests/exception_test.cpp +++ b/cpp/src/tests/exception_test.cpp @@ -28,6 +28,9 @@ QPID_AUTO_TEST_SUITE(exception_test) +// FIXME aconway 2008-06-12: need to update our exception handling to +// 0-10 handling and extend this test to provoke all the exceptional +// conditions we know of and verify the correct exception is thrown. using namespace std; using namespace qpid; @@ -51,10 +54,10 @@ struct Catcher : public Runnable { try { f(); } catch(const Ex& e) { caught=true; - BOOST_MESSAGE(string("Caught expected exception: ")+e.what()); + BOOST_MESSAGE(string("Caught expected exception: ")+e.what()+"["+typeid(e).name()+"]"); } catch(const std::exception& e) { - BOOST_ERROR(string("Bad exception: ")+e.what()); + BOOST_ERROR(string("Bad exception: ")+e.what()+"["+typeid(e).name()+"] expected: "+typeid(Ex).name()); } catch(...) { BOOST_ERROR(string("Bad exception: unknown")); @@ -75,7 +78,7 @@ QPID_AUTO_TEST_CASE(DisconnectedPop) { 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))); + Catcher<Exception> pop(bind(&LocalQueue::pop, boost::ref(fix.lq))); fix.connection.proxy.close(); BOOST_CHECK(pop.join()); } |