diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-07-05 11:09:55 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-07-05 11:09:55 +0000 |
commit | 9b8cc712d4a41d71840416776bc94ee8485bb9b3 (patch) | |
tree | 7d467fdd6a66bc2b5878d82070d45adbd5c20414 /cppe/test/IceE/operations/Collocated.cpp | |
parent | cleaning the cache method out of ReferenceFactory (diff) | |
download | ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.tar.bz2 ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.tar.xz ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.zip |
Changed Ice to IceE EVERYWHERE!!!
Diffstat (limited to 'cppe/test/IceE/operations/Collocated.cpp')
-rw-r--r-- | cppe/test/IceE/operations/Collocated.cpp | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/cppe/test/IceE/operations/Collocated.cpp b/cppe/test/IceE/operations/Collocated.cpp new file mode 100644 index 00000000000..6daf941fadf --- /dev/null +++ b/cppe/test/IceE/operations/Collocated.cpp @@ -0,0 +1,81 @@ +// ********************************************************************** +// +// 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 <TestCommon.h>
+#include <TestApplication.h>
+#include <TestI.h> + +using namespace std; + +class OperationsTestApplication : public TestApplication +{ +public: +
+ OperationsTestApplication() :
+ TestApplication("operations collocated")
+ {
+ }
+ + virtual int + run(int argc, char* argv[]) + { + IceE::PropertiesPtr properties = IceE::getDefaultProperties(argc, argv); + + // + // We must set MessageSizeMax to an explicit values, because + // we run tests to check whether IceE.MemoryLimitException is + // raised as expected. + // + properties->setProperty("IceE.MessageSizeMax", "100");
+ properties->setProperty("CheckedCastAdapter.Endpoints", "default -p 12346 -t 10000");
+ properties->setProperty("TestAdapter.Endpoints", "default -p 12345 -t 10000");
+ //properties->setProperty("IceE.Trace.Protocol", "10");
+ //properties->setProperty("IceE.Trace.Network", "10"); + + setCommunicator(IceE::initialize(argc, argv)); + + IceE::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); + IceE::ObjectPtr object = new MyDerivedClassI(adapter, IceE::stringToIdentity("test")); + adapter->add(object, IceE::stringToIdentity("test")); + adapter->activate(); + + // + // Make a separate adapter with a servant locator. We use this to test + // that ::IceE::Context is correctly passed to checkedCast() operation. + // + adapter = communicator()->createObjectAdapter("CheckedCastAdapter"); + adapter->activate(); + + Test::MyClassPrx allTests(const IceE::CommunicatorPtr&); + allTests(communicator()); + + return EXIT_SUCCESS; + } +}; +
+#ifdef _WIN32_WCE + +int WINAPI +WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) +{ + OperationsTestApplication app; + return app.main(hInstance); +} + +#else + +int +main(int argc, char** argv) +{ + OperationsTestApplication app; + return app.main(argc, argv); +} + +#endif |