summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/exceptions/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/exceptions/Client.cpp')
-rw-r--r--cpp/test/Ice/exceptions/Client.cpp50
1 files changed, 17 insertions, 33 deletions
diff --git a/cpp/test/Ice/exceptions/Client.cpp b/cpp/test/Ice/exceptions/Client.cpp
index 89135606fb7..9a90cfdff5f 100644
--- a/cpp/test/Ice/exceptions/Client.cpp
+++ b/cpp/test/Ice/exceptions/Client.cpp
@@ -8,46 +8,30 @@
// **********************************************************************
#include <Ice/Ice.h>
-#include <TestCommon.h>
+#include <TestHelper.h>
#include <Test.h>
-DEFINE_TEST("client")
-
using namespace std;
using namespace Test;
-int
-run(int, char**, const Ice::CommunicatorPtr& communicator)
+class Client : public Test::TestHelper
{
- ThrowerPrxPtr allTests(const Ice::CommunicatorPtr&);
- ThrowerPrxPtr thrower = allTests(communicator);
- thrower->shutdown();
- return EXIT_SUCCESS;
-}
+public:
-int
-main(int argc, char* argv[])
-{
-#ifdef ICE_STATIC_LIBS
- Ice::registerIceSSL(false);
- Ice::registerIceWS(true);
-# ifdef ICE_HAS_BT
- Ice::registerIceBT(false);
-# endif
-#endif
+ void run(int, char**);
+};
- try
- {
- Ice::InitializationData initData = getTestInitData(argc, argv);
- initData.properties->setProperty("Ice.Warn.Connections", "0");
- initData.properties->setProperty("Ice.MessageSizeMax", "10"); // 10KB max
+void
+Client::run(int argc, char** argv)
+{
+ Ice::PropertiesPtr properties = createTestProperties(argc, argv);
+ properties->setProperty("Ice.Warn.Connections", "0");
+ properties->setProperty("Ice.MessageSizeMax", "10"); // 10KB max
+ Ice::CommunicatorHolder communicator = initialize(argc, argv, properties);
- Ice::CommunicatorHolder ich(argc, argv, initData);
- return run(argc, argv, ich.communicator());
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- return EXIT_FAILURE;
- }
+ ThrowerPrxPtr allTests(Test::TestHelper*);
+ ThrowerPrxPtr thrower = allTests(this);
+ thrower->shutdown();
}
+
+DEFINE_TEST(Client)