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/IceGrid/allocation/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/IceGrid/allocation/Client.cpp')
-rw-r--r-- | cpp/test/IceGrid/allocation/Client.cpp | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/cpp/test/IceGrid/allocation/Client.cpp b/cpp/test/IceGrid/allocation/Client.cpp index 1e8df96a8ca..33f90f5d9b1 100644 --- a/cpp/test/IceGrid/allocation/Client.cpp +++ b/cpp/test/IceGrid/allocation/Client.cpp @@ -8,41 +8,25 @@ // ********************************************************************** #include <Ice/Ice.h> -#include <TestCommon.h> +#include <TestHelper.h> #include <Test.h> using namespace std; -int -run(int, char**, const Ice::CommunicatorPtr& communicator) +class Client : public Test::TestHelper { - void allTests(const Ice::CommunicatorPtr&); - allTests(communicator); - return EXIT_SUCCESS; -} - -int -main(int argc, char* argv[]) -{ - int status; - Ice::CommunicatorPtr communicator; - try - { - Ice::InitializationData initData = getTestInitData(argc, argv); - communicator = Ice::initialize(argc, argv, initData); - communicator->getProperties()->parseCommandLineOptions("", Ice::argsToStringSeq(argc, argv)); - status = run(argc, argv, communicator); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } +public: - if(communicator) - { - communicator->destroy(); - } + void run(int, char**); +}; - return status; +void +Client::run(int argc, char** argv) +{ + Ice::CommunicatorHolder communicator = initialize(argc, argv); + communicator->getProperties()->parseCommandLineOptions("", Ice::argsToStringSeq(argc, argv)); + void allTests(Test::TestHelper*); + allTests(this); } + +DEFINE_TEST(Client) |