diff options
author | Michi Henning <michi@zeroc.com> | 2005-05-19 01:47:35 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-05-19 01:47:35 +0000 |
commit | c672443296deee643ff325b23738f413b557488d (patch) | |
tree | 69649b23f0ce78188b4d250a095161ebbcfc8973 /cpp/test/Ice/exceptions/AllTests.cpp | |
parent | Fixed http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=324. (diff) | |
download | ice-c672443296deee643ff325b23738f413b557488d.tar.bz2 ice-c672443296deee643ff325b23738f413b557488d.tar.xz ice-c672443296deee643ff325b23738f413b557488d.zip |
Fixed http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=324
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/AllTests.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index eebeffd68cc..22f0c720a0c 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -566,28 +566,24 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter1"); Ice::ObjectPtr obj = new EmptyI; adapter->add(obj, Ice::stringToIdentity("x")); - bool gotException = false; try { adapter->add(obj, Ice::stringToIdentity("x")); + test(false); } catch(const Ice::AlreadyRegisteredException&) { - gotException = true; } - test(gotException); - gotException = false; adapter->remove(Ice::stringToIdentity("x")); try { adapter->remove(Ice::stringToIdentity("x")); + test(false); } catch(const Ice::NotRegisteredException&) { - gotException = true; } - test(gotException); adapter->deactivate(); } @@ -598,16 +594,14 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter2"); Ice::ServantLocatorPtr loc = new ServantLocatorI; adapter->addServantLocator(loc, "x"); - bool gotException = false; try { adapter->addServantLocator(loc, "x"); + test(false); } catch(const Ice::AlreadyRegisteredException&) { - gotException = true; } - test(gotException); adapter->deactivate(); } @@ -617,28 +611,24 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { Ice::ObjectFactoryPtr of = new ObjectFactoryI; communicator->addObjectFactory(of, "x"); - bool gotException = false; try { communicator->addObjectFactory(of, "x"); + test(false); } catch(const Ice::AlreadyRegisteredException&) { - gotException = true; } - test(gotException); - gotException = false; communicator->removeObjectFactory("x"); try { communicator->removeObjectFactory("x"); + test(false); } catch(const Ice::NotRegisteredException&) { - gotException = true; } - test(gotException); } cout << "ok" << endl; |