diff options
author | Jose <jose@zeroc.com> | 2018-06-01 17:41:03 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-06-01 17:41:03 +0200 |
commit | cbe92e540a7f02f0bdf93192424bd119189365b7 (patch) | |
tree | 411c50dc0ae9c669d31a940b1b4903b5deac4f12 /cpp/test/Ice/exceptions/Client.cpp | |
parent | Fixed Util.py check for binary installation directory on Windows (diff) | |
download | ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.bz2 ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.xz ice-cbe92e540a7f02f0bdf93192424bd119189365b7.zip |
Do not use Ice::Application for Ice testsuite
Diffstat (limited to 'cpp/test/Ice/exceptions/Client.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/Client.cpp | 50 |
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) |