summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/exceptions/AllTests.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2007-11-05 23:43:07 +1000
committerMichi Henning <michi@zeroc.com>2007-11-05 23:43:07 +1000
commita2a5af41c5274fa7e254558841c1367d07a445d4 (patch)
treea7ede915600cc8dcb0df48c535bd602ec225e95c /cpp/test/Ice/exceptions/AllTests.cpp
parentFixed bug I introduced with the sequence mapping changes that caused (diff)
downloadice-a2a5af41c5274fa7e254558841c1367d07a445d4.tar.bz2
ice-a2a5af41c5274fa7e254558841c1367d07a445d4.tar.xz
ice-a2a5af41c5274fa7e254558841c1367d07a445d4.zip
Bug 2522 for C++ and Java.
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp72
1 files changed, 5 insertions, 67 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
index 84efae4b113..457169e9609 100644
--- a/cpp/test/Ice/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -961,22 +961,8 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
thrower->throwUndeclaredA(1);
test(false);
}
- catch(const A& ex)
- {
- //
- // We get the original exception with collocation
- // optimization.
- //
- test(collocated);
- test(ex.aMem == 1);
- }
catch(const Ice::UnknownUserException&)
{
- //
- // We get an unknown user exception without collocation
- // optimization.
- //
- test(!collocated);
}
catch(...)
{
@@ -988,23 +974,8 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
thrower->throwUndeclaredB(1, 2);
test(false);
}
- catch(const B& ex)
- {
- //
- // We get the original exception with collocation
- // optimization.
- //
- test(collocated);
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- }
catch(const Ice::UnknownUserException&)
{
- //
- // We get an unknown user exception without collocation
- // optimization.
- //
- test(!collocated);
}
catch(...)
{
@@ -1016,24 +987,8 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
thrower->throwUndeclaredC(1, 2, 3);
test(false);
}
- catch(const C& ex)
- {
- //
- // We get the original exception with collocation
- // optimization.
- //
- test(collocated);
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- test(ex.cMem == 3);
- }
catch(const Ice::UnknownUserException&)
{
- //
- // We get an unknown user exception without
- // collocation optimization.
- //
- test(!collocated);
}
catch(...)
{
@@ -1112,22 +1067,14 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
thrower->throwLocalException();
test(false);
}
- catch(const Ice::TimeoutException&)
- {
- //
- // We get the original exception with collocation
- // optimization.
- //
- test(collocated);
- }
catch(const Ice::UnknownLocalException&)
{
- //
- // We get an unknown local exception without collocation
- // optimization.
- //
test(!collocated);
}
+ catch(const Ice::TimeoutException&)
+ {
+ test(collocated);
+ }
catch(...)
{
test(false);
@@ -1144,19 +1091,10 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
}
catch(const Ice::UnknownException&)
{
- //
- // We get an unknown exception without collocation
- // optimization.
- //
- assert(!collocated);
}
catch(...)
{
- //
- // We get the original exception with collocation
- // optimization.
- //
- assert(collocated);
+ test(false);
}
cout << "ok" << endl;