summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/inheritance/Collocated.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/inheritance/Collocated.cpp')
-rw-r--r--cpp/test/Ice/inheritance/Collocated.cpp46
1 files changed, 15 insertions, 31 deletions
diff --git a/cpp/test/Ice/inheritance/Collocated.cpp b/cpp/test/Ice/inheritance/Collocated.cpp
index 57248407eb0..c77900702df 100644
--- a/cpp/test/Ice/inheritance/Collocated.cpp
+++ b/cpp/test/Ice/inheritance/Collocated.cpp
@@ -8,45 +8,29 @@
// **********************************************************************
#include <Ice/Ice.h>
-#include <TestCommon.h>
+#include <TestHelper.h>
#include <TestI.h>
-DEFINE_TEST("collocated")
-
using namespace std;
using namespace Test;
-int
-run(int, char**, const Ice::CommunicatorPtr& communicator)
+class Collocated : public Test::TestHelper
{
- communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0));
+public:
+
+ void run(int, char**);
+};
+
+void
+Collocated::run(int argc, char** argv)
+{
+ Ice::CommunicatorHolder communicator = initialize(argc, argv);
+ communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint());
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
Ice::ObjectPtr object = ICE_MAKE_SHARED(InitialI, adapter);
adapter->add(object, Ice::stringToIdentity("initial"));
-
- InitialPrxPtr allTests(const Ice::CommunicatorPtr&);
- allTests(communicator);
-
- return EXIT_SUCCESS;
+ InitialPrxPtr allTests(Test::TestHelper*);
+ allTests(this);
}
-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(Collocated)