summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/slicing/exceptions/ServerAMD.cpp')
-rw-r--r--cpp/test/Ice/slicing/exceptions/ServerAMD.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp b/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp
index b728b9304c9..028c950ba1f 100644
--- a/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp
+++ b/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp
@@ -9,42 +9,29 @@
#include <Ice/Ice.h>
#include <TestAMDI.h>
-#include <TestCommon.h>
+#include <TestHelper.h>
using namespace std;
-DEFINE_TEST("serveramd")
+class ServerAMD : public Test::TestHelper
+{
+public:
+
+ void run(int, char**);
+};
-int
-run(int, char**, const Ice::CommunicatorPtr& communicator)
+void
+ServerAMD::run(int argc, char** argv)
{
+ Ice::CommunicatorHolder communicator = initialize(argc, argv);
Ice::PropertiesPtr properties = communicator->getProperties();
properties->setProperty("Ice.Warn.Dispatch", "0");
- communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000");
+ communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint() + " -t 2000");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
adapter->add(ICE_MAKE_SHARED(TestI), Ice::stringToIdentity("Test"));
adapter->activate();
- TEST_READY
+ serverReady();
communicator->waitForShutdown();
- return EXIT_SUCCESS;
}
-int
-main(int argc, char* argv[])
-{
-#ifdef ICE_STATIC_LIBS
- Ice::registerIceSSL(false);
- Ice::registerIceWS(true);
-#endif
- try
- {
- Ice::InitializationData initData = getTestInitData(argc, argv);
- Ice::CommunicatorHolder ich(argc, argv, initData);
- return run(argc, argv, ich.communicator());
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- return EXIT_FAILURE;
- }
-}
+DEFINE_TEST(ServerAMD)