diff options
author | Bernard Normier <bernard@zeroc.com> | 2015-12-11 18:00:31 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2015-12-11 18:00:31 -0500 |
commit | a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8 (patch) | |
tree | 979e304b6beb03bdceed36bee74edd5cabfa9add /cpp/test/Slice/structure/Client.cpp | |
parent | Fix Windows C++ tests build (diff) | |
download | ice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.tar.bz2 ice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.tar.xz ice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.zip |
Updated Ice::CommunicationHolder and simplified tests
Diffstat (limited to 'cpp/test/Slice/structure/Client.cpp')
-rw-r--r-- | cpp/test/Slice/structure/Client.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/cpp/test/Slice/structure/Client.cpp b/cpp/test/Slice/structure/Client.cpp index d885eed960c..9de640287ef 100644 --- a/cpp/test/Slice/structure/Client.cpp +++ b/cpp/test/Slice/structure/Client.cpp @@ -273,34 +273,14 @@ run(const Ice::CommunicatorPtr& communicator) int main(int argc, char* argv[]) { - int status; - Ice::CommunicatorPtr communicator; - try { - Ice::InitializationData initData; - initData.properties = Ice::createProperties(argc, argv); - communicator = ICE_COMMUNICATOR_HOLDER_RELEASE(Ice::initialize(argc, argv, initData)); - status = run(communicator); + Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); + return run(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; } |