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/slicing/exceptions/Server.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/slicing/exceptions/Server.cpp')
-rw-r--r-- | cpp/test/Ice/slicing/exceptions/Server.cpp | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/cpp/test/Ice/slicing/exceptions/Server.cpp b/cpp/test/Ice/slicing/exceptions/Server.cpp index bdd2231a8a9..e9b99711968 100644 --- a/cpp/test/Ice/slicing/exceptions/Server.cpp +++ b/cpp/test/Ice/slicing/exceptions/Server.cpp @@ -9,42 +9,29 @@ #include <Ice/Ice.h> #include <TestI.h> -#include <TestCommon.h> +#include <TestHelper.h> using namespace std; -DEFINE_TEST("server") +class Server : public Test::TestHelper +{ +public: + + void run(int, char**); +}; -int -run(int, char**, const Ice::CommunicatorPtr& communicator) +void +Server::run(int argc, char** argv) { + Ice::CommunicatorHolder communicator = initialize(argc, argv); Ice::PropertiesPtr properties = communicator->getProperties(); properties->setProperty("Ice.Warn.Dispatch", "0"); - communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); + communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint() + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(ICE_MAKE_SHARED(TestI), Ice::stringToIdentity("Test")); adapter->activate(); - TEST_READY + serverReady(); communicator->waitForShutdown(); - return EXIT_SUCCESS; } -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(Server) |