diff options
Diffstat (limited to 'cpp/test/Ice/slicing/objects/Client.cpp')
-rw-r--r-- | cpp/test/Ice/slicing/objects/Client.cpp | 54 |
1 files changed, 19 insertions, 35 deletions
diff --git a/cpp/test/Ice/slicing/objects/Client.cpp b/cpp/test/Ice/slicing/objects/Client.cpp index 82a6dcfe273..63c933f044a 100644 --- a/cpp/test/Ice/slicing/objects/Client.cpp +++ b/cpp/test/Ice/slicing/objects/Client.cpp @@ -8,48 +8,32 @@ // ********************************************************************** #include <Ice/Ice.h> -#include <TestCommon.h> +#include <TestHelper.h> #include <ClientPrivate.h> using namespace std; using namespace Test; -DEFINE_TEST("client") - -int -run(int, char**, const Ice::CommunicatorPtr& communicator) +class Client : public Test::TestHelper { - TestIntfPrxPtr allTests(const Ice::CommunicatorPtr&); - TestIntfPrxPtr Test = allTests(communicator); - Test->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); - // - // For this test, we enable object collection. - // - initData.properties->setProperty("Ice.CollectObjects", "1"); +void +Client::run(int argc, char** argv) +{ + Ice::PropertiesPtr properties = createTestProperties(argc, argv); + // + // For this test, we enable object collection. + // + properties->setProperty("Ice.CollectObjects", "1"); - 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); + TestIntfPrxPtr allTests(Test::TestHelper*); + TestIntfPrxPtr prx = allTests(this); + prx->shutdown(); } + +DEFINE_TEST(Client) |