summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/library/Client.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-06-01 17:41:03 +0200
committerJose <jose@zeroc.com>2018-06-01 17:41:03 +0200
commitcbe92e540a7f02f0bdf93192424bd119189365b7 (patch)
tree411c50dc0ae9c669d31a940b1b4903b5deac4f12 /cpp/test/Ice/library/Client.cpp
parentFixed Util.py check for binary installation directory on Windows (diff)
downloadice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.bz2
ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.xz
ice-cbe92e540a7f02f0bdf93192424bd119189365b7.zip
Do not use Ice::Application for Ice testsuite
Diffstat (limited to 'cpp/test/Ice/library/Client.cpp')
-rw-r--r--cpp/test/Ice/library/Client.cpp40
1 files changed, 18 insertions, 22 deletions
diff --git a/cpp/test/Ice/library/Client.cpp b/cpp/test/Ice/library/Client.cpp
index f5f7483b4a8..093495bd69e 100644
--- a/cpp/test/Ice/library/Client.cpp
+++ b/cpp/test/Ice/library/Client.cpp
@@ -8,7 +8,7 @@
// **********************************************************************
#include <Ice/Ice.h>
-#include <TestCommon.h>
+#include <TestHelper.h>
ICE_DECLSPEC_IMPORT void
allTests(const Ice::ObjectAdapterPtr&);
@@ -17,28 +17,24 @@ allTests(const Ice::ObjectAdapterPtr&);
# pragma comment(lib, ICE_LIBNAME("alltests"))
#endif
-DEFINE_TEST("client")
-
using namespace std;
-int
-main(int argc, char* argv[])
+class Client : public Test::TestHelper
+{
+public:
+
+ void run(int, char**);
+};
+
+void
+Client::run(int argc, char** argv)
{
- try
- {
- Ice::InitializationData initData = getTestInitData(argc, argv);
- Ice::CommunicatorHolder ich(argc, argv, initData);
-
- // Collocated-only OA
- Ice::ObjectAdapterPtr oa = ich->createObjectAdapter("");
-
- oa->activate();
- allTests(oa);
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- return EXIT_FAILURE;
- }
- return EXIT_SUCCESS;
+ Ice::CommunicatorHolder communicator = initialize(argc, argv);
+ // Collocated-only OA
+ Ice::ObjectAdapterPtr oa = communicator->createObjectAdapter("");
+
+ oa->activate();
+ allTests(oa);
}
+
+DEFINE_TEST(Client)