summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/optional/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/optional/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/optional/Client.cpp')
-rw-r--r--cpp/test/Ice/optional/Client.cpp48
1 files changed, 16 insertions, 32 deletions
diff --git a/cpp/test/Ice/optional/Client.cpp b/cpp/test/Ice/optional/Client.cpp
index cd025c208ca..c4afb448df3 100644
--- a/cpp/test/Ice/optional/Client.cpp
+++ b/cpp/test/Ice/optional/Client.cpp
@@ -8,46 +8,30 @@
// **********************************************************************
#include <Ice/Ice.h>
-#include <TestCommon.h>
+#include <TestHelper.h>
#include <TestI.h>
-DEFINE_TEST("client")
-
using namespace std;
using namespace Test;
-int
-run(int, char**, const Ice::CommunicatorPtr& communicator)
+class Client : public Test::TestHelper
{
- InitialPrxPtr allTests(const Ice::CommunicatorPtr&, bool);
- InitialPrxPtr initial = allTests(communicator, false);
- initial->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);
+void
+Client::run(int argc, char** argv)
+{
+ Ice::PropertiesPtr properties = createTestProperties(argc, argv);
#ifndef ICE_CPP11_MAPPING
- initData.properties->setProperty("Ice.CollectObjects", "1");
+ properties->setProperty("Ice.CollectObjects", "1");
#endif
- Ice::CommunicatorHolder ich(argc, argv, initData);
- return run(argc, argv, ich.communicator());
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- return EXIT_FAILURE;
- }
+ Ice::CommunicatorHolder communicator = initialize(argc, argv, properties);
+ InitialPrxPtr allTests(Test::TestHelper*, bool);
+ InitialPrxPtr initial = allTests(this, false);
+ initial->shutdown();
}
+
+DEFINE_TEST(Client)