diff options
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/AllTests.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 8834c89ecad..caf331f30ff 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -1343,6 +1343,53 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) cout << "ok" << endl; } + { + cout << "testing memory limit marshal exception..." << flush; + try + { + thrower->throwMemoryLimitException(Ice::ByteSeq()); + test(collocated); + } + catch(const Ice::UnknownLocalException&) + { + } + catch(...) + { + test(false); + } + + try + { + thrower->throwMemoryLimitException(Ice::ByteSeq(20 * 1024)); // 20KB + test(collocated); + } + catch(const Ice::MemoryLimitException& ex) + { + } + catch(...) + { + test(false); + } + + if(!collocated) + { + try + { + thrower->end_throwMemoryLimitException( + thrower->begin_throwMemoryLimitException(Ice::ByteSeq(20 * 1024))); // 20KB + test(false); + } + catch(const Ice::MemoryLimitException&) + { + } + catch(...) + { + test(false); + } + } + cout << "ok" << endl; + } + cout << "catching object not exist exception... " << flush; Ice::Identity id = communicator->stringToIdentity("does not exist"); |