diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-06-11 18:53:17 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-06-11 18:53:17 +0200 |
commit | 27b1f7cc1b061fbf3a1582963d0af08d5839d480 (patch) | |
tree | c93c4a0c885ec941ec33116dd2f5683042d96a34 /cpp/test/Ice/optional/Client.cpp | |
parent | Java port (diff) | |
download | ice-27b1f7cc1b061fbf3a1582963d0af08d5839d480.tar.bz2 ice-27b1f7cc1b061fbf3a1582963d0af08d5839d480.tar.xz ice-27b1f7cc1b061fbf3a1582963d0af08d5839d480.zip |
Support for optionals
Diffstat (limited to 'cpp/test/Ice/optional/Client.cpp')
-rw-r--r-- | cpp/test/Ice/optional/Client.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/cpp/test/Ice/optional/Client.cpp b/cpp/test/Ice/optional/Client.cpp new file mode 100644 index 00000000000..ffb919949ef --- /dev/null +++ b/cpp/test/Ice/optional/Client.cpp @@ -0,0 +1,57 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestCommon.h> +#include <TestI.h> + +using namespace std; +using namespace Test; + +int +run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) +{ + InitialPrx allTests(const Ice::CommunicatorPtr&, bool); + InitialPrx initial = allTests(communicator, false); + initial->shutdown(); + return EXIT_SUCCESS; +} + +int +main(int argc, char* argv[]) +{ + int status; + Ice::CommunicatorPtr communicator; + + try + { + communicator = Ice::initialize(argc, argv); + status = run(argc, argv, communicator); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + + if(communicator) + { + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } + } + + return status; +} |