summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/exceptions/AllTests.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2011-12-07 01:29:37 +0100
committerJose <jose@zeroc.com>2011-12-07 01:29:37 +0100
commite621be781151af92e49d807a6fa5e964145ba0c6 (patch)
tree0c9698aa356c6ff4e81707e63cfd01e9a26e6116 /cpp/test/Ice/exceptions/AllTests.cpp
parentGlacier2 C++ SessionHelper VC100 fix (diff)
downloadice-e621be781151af92e49d807a6fa5e964145ba0c6.tar.bz2
ice-e621be781151af92e49d807a6fa5e964145ba0c6.tar.xz
ice-e621be781151af92e49d807a6fa5e964145ba0c6.zip
ICE-4594 Patch for local exception and C++ ice_print
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
index a8f17c4552c..da73a1e836f 100644
--- a/cpp/test/Ice/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -1417,6 +1417,65 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
{
test(false);
}
+
+
+ try
+ {
+ thrower->throwE();
+ }
+ catch(const E& ex)
+ {
+ ostringstream os;
+ ex.ice_print(os);
+ test(os.str() == "Test::E");
+ test(ex.data == "E");
+ }
+ catch(...)
+ {
+ test(false);
+ }
+
+ try
+ {
+ thrower->throwF();
+ }
+ catch(const F& ex)
+ {
+ ostringstream os;
+ ex.ice_print(os);
+ test(os.str() == "Test::F data:'F'");
+ test(ex.data == "F");
+ }
+ catch(...)
+ {
+ test(false);
+ }
+
+ try
+ {
+ thrower->throwG();
+ test(false);
+ }
+ catch(const Ice::UnknownLocalException&)
+ {
+ }
+ catch(...)
+ {
+ test(false);
+ }
+
+ try
+ {
+ thrower->throwH();
+ test(false);
+ }
+ catch(const Ice::UnknownLocalException&)
+ {
+ }
+ catch(...)
+ {
+ test(false);
+ }
cout << "ok" << endl;