summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/enums/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/enums/Client.cpp')
-rw-r--r--cpp/test/Ice/enums/Client.cpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/cpp/test/Ice/enums/Client.cpp b/cpp/test/Ice/enums/Client.cpp
index c56162126cc..c4d0ae98781 100644
--- a/cpp/test/Ice/enums/Client.cpp
+++ b/cpp/test/Ice/enums/Client.cpp
@@ -19,8 +19,8 @@ using namespace Test;
int
run(int, char**, const Ice::CommunicatorPtr& communicator)
{
- TestIntfPrx allTests(const Ice::CommunicatorPtr&);
- TestIntfPrx t = allTests(communicator);
+ TestIntfPrxPtr allTests(const Ice::CommunicatorPtr&);
+ TestIntfPrxPtr t = allTests(communicator);
t->shutdown();
return EXIT_SUCCESS;
}
@@ -30,33 +30,20 @@ main(int argc, char* argv[])
{
#ifdef ICE_STATIC_LIBS
Ice::registerIceSSL();
+# if defined(__linux)
+ Ice::registerIceBT();
+# endif
#endif
- int status;
- Ice::CommunicatorPtr communicator;
try
{
- communicator = Ice::initialize(argc, argv);
- status = run(argc, argv, communicator);
+ Ice::InitializationData initData = getTestInitData(argc, argv);
+ Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
+ return run(argc, argv, ich.communicator());
}
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
- status = EXIT_FAILURE;
+ return EXIT_FAILURE;
}
-
- if(communicator)
- {
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
- }
-
- return status;
}