diff options
Diffstat (limited to 'cppe/test/IceE/inheritance/Collocated.cpp')
-rw-r--r-- | cppe/test/IceE/inheritance/Collocated.cpp | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/cppe/test/IceE/inheritance/Collocated.cpp b/cppe/test/IceE/inheritance/Collocated.cpp new file mode 100644 index 00000000000..f2cb5b9f651 --- /dev/null +++ b/cppe/test/IceE/inheritance/Collocated.cpp @@ -0,0 +1,65 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 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 <IceE/IceE.h> +#include <TestApplication.h> +#include <TestI.h> + +using namespace std; +using namespace Test; + +class InheritanceTestApplication : public TestApplication +{ +public: + + InheritanceTestApplication() : + TestApplication("inheritance collocated") + { + } + + virtual int + run(int argc, char* argv[]) + { + IceE::PropertiesPtr properties = IceE::getDefaultProperties(argc, argv);
+ properties->setProperty("TestAdapter.Endpoints", "default -p 12345 -t 10000"); + + setCommunicator(IceE::initialize(argc, argv)); + + IceE::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); + IceE::ObjectPtr object = new InitialI(adapter); + adapter->add(object, IceE::stringToIdentity("initial")); + adapter->activate(); + + InitialPrx allTests(const IceE::CommunicatorPtr&); + allTests(communicator()); + + return EXIT_SUCCESS; + } + +}; + +#ifdef _WIN32_WCE + +int WINAPI +WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) +{ + InheritanceTestApplication app; + return app.main(hInstance); +} + +#else + +int +main(int argc, char** argv) +{ + InheritanceTestApplication app; + return app.main(argc, argv); +} + +#endif |