diff options
author | Marc Laukien <marc@zeroc.com> | 2001-11-13 20:28:08 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-11-13 20:28:08 +0000 |
commit | 7d200cf8404655ce2e0ba62360d7030b67eb8514 (patch) | |
tree | 9de4d4a471480bb30a4bad05fcb3859a47a1b09e /cpp/test | |
parent | Added for testing purposes. "cacert.pem" is a self-signed Mutable Realms CA (diff) | |
download | ice-7d200cf8404655ce2e0ba62360d7030b67eb8514.tar.bz2 ice-7d200cf8404655ce2e0ba62360d7030b67eb8514.tar.xz ice-7d200cf8404655ce2e0ba62360d7030b67eb8514.zip |
fixes
Diffstat (limited to 'cpp/test')
21 files changed, 289 insertions, 295 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 7112e8f985a..bd2b65646f1 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -50,26 +50,26 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { cout << "testing stringToProxy... " << flush; string ref; -
- Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
- string secure;
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- if (protocol.compare("ssl") == 0)
- {
- secure = " -s ";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
- ref = "thrower" + secure + ":" + endpts;
-
+ + Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + string secure; + + if (protocol.empty()) + { + protocol = "tcp"; + } + + if (protocol.compare("ssl") == 0) + { + secure = " -s "; + } + + string endpts = protocol + " -p 12345 -t 2000"; + + ref = "thrower" + secure + ":" + endpts; + Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/exceptions/Collocated.cpp b/cpp/test/Ice/exceptions/Collocated.cpp index c7e199b9eff..6b067900c42 100644 --- a/cpp/test/Ice/exceptions/Collocated.cpp +++ b/cpp/test/Ice/exceptions/Collocated.cpp @@ -16,15 +16,15 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + string endpts = protocol + " -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new ThrowerI(adapter); diff --git a/cpp/test/Ice/exceptions/Server.cpp b/cpp/test/Ice/exceptions/Server.cpp index 3f9234a91ee..86c07ae74b5 100644 --- a/cpp/test/Ice/exceptions/Server.cpp +++ b/cpp/test/Ice/exceptions/Server.cpp @@ -16,15 +16,15 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + string endpts = protocol + " -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new ThrowerI(adapter); diff --git a/cpp/test/Ice/facets/AllTests.cpp b/cpp/test/Ice/facets/AllTests.cpp index dace7b6a474..e9d7076be60 100644 --- a/cpp/test/Ice/facets/AllTests.cpp +++ b/cpp/test/Ice/facets/AllTests.cpp @@ -17,22 +17,22 @@ using namespace std; GPrx allTests(const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- string secure;
-
- if (protocol.compare("ssl") == 0)
- {
- secure = " -s ";
- }
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + + string secure; + + if (protocol.compare("ssl") == 0) + { + secure = " -s "; + } + cout << "testing stringToProxy... " << flush; string ref = "d" + secure + ":" + protocol + " -p 12345 -t 2000"; Ice::ObjectPrx db = communicator->stringToProxy(ref); diff --git a/cpp/test/Ice/facets/Collocated.cpp b/cpp/test/Ice/facets/Collocated.cpp index c6749cce3ff..1c60e13137c 100644 --- a/cpp/test/Ice/facets/Collocated.cpp +++ b/cpp/test/Ice/facets/Collocated.cpp @@ -16,27 +16,27 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + string endpts = protocol + " -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr d = new DI; adapter->add(d, "d"); - d->_addFacet(d, "facetABCD"); - d->_addFacet(new FI, "facetEF"); - d->_addFacet(new GI(communicator), "facetG"); + d->_ice_addFacet(d, "facetABCD"); + d->_ice_addFacet(new FI, "facetEF"); + d->_ice_addFacet(new GI(communicator), "facetG"); GPrx allTests(const Ice::CommunicatorPtr&); allTests(communicator); - d->_removeAllFacets(); // Break cyclic dependencies + d->_ice_removeAllFacets(); // Break cyclic dependencies return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/facets/Server.cpp b/cpp/test/Ice/facets/Server.cpp index 07ffaffa3d9..35c7805b1dc 100644 --- a/cpp/test/Ice/facets/Server.cpp +++ b/cpp/test/Ice/facets/Server.cpp @@ -16,27 +16,27 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + string endpts = protocol + " -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr d = new DI; adapter->add(d, "d"); - d->_addFacet(d, "facetABCD"); - d->_addFacet(new FI, "facetEF"); - d->_addFacet(new GI(communicator), "facetG"); + d->_ice_addFacet(d, "facetABCD"); + d->_ice_addFacet(new FI, "facetEF"); + d->_ice_addFacet(new GI(communicator), "facetG"); adapter->activate(); communicator->waitForShutdown(); - d->_removeAllFacets(); // Break cyclic dependencies + d->_ice_removeAllFacets(); // Break cyclic dependencies return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/faultTolerance/AllTests.cpp b/cpp/test/Ice/faultTolerance/AllTests.cpp index 164dda0093e..7e09b2db5f8 100644 --- a/cpp/test/Ice/faultTolerance/AllTests.cpp +++ b/cpp/test/Ice/faultTolerance/AllTests.cpp @@ -17,22 +17,22 @@ using namespace std; void allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- string secure;
-
- if (protocol.compare("ssl") == 0)
- {
- secure = " -s ";
- }
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + + string secure; + + if (protocol.compare("ssl") == 0) + { + secure = " -s "; + } + cout << "testing stringToProxy... " << flush; ostringstream ref; ref << "test" << secure; @@ -101,7 +101,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports) cout << "testing whether all servers are gone... " << flush; try { - obj->_ping(); + obj->_ice_ping(); test(false); } catch(const Ice::SocketException&) diff --git a/cpp/test/Ice/faultTolerance/Server.cpp b/cpp/test/Ice/faultTolerance/Server.cpp index d2c3d021b20..d011339fbf1 100644 --- a/cpp/test/Ice/faultTolerance/Server.cpp +++ b/cpp/test/Ice/faultTolerance/Server.cpp @@ -50,15 +50,15 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) } ostringstream endpts; - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + endpts << protocol << " -p " << port; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts.str()); Ice::ObjectPtr object = new TestI(adapter); diff --git a/cpp/test/Ice/locationForward/AllTests.cpp b/cpp/test/Ice/locationForward/AllTests.cpp index 429bc73bd6b..ee29f5c5732 100644 --- a/cpp/test/Ice/locationForward/AllTests.cpp +++ b/cpp/test/Ice/locationForward/AllTests.cpp @@ -17,20 +17,20 @@ using namespace std; void allTests(const Ice::CommunicatorPtr& communicator, int port, int lastPort) { - Ice::PropertiesPtr properties = communicator->getProperties();
- string protocol = properties->getProperty("Ice.Protocol");
- string secure;
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- if (protocol.compare("ssl") == 0)
- {
- secure = " -s ";
- }
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + string protocol = properties->getProperty("Ice.Protocol"); + string secure; + + if (protocol.empty()) + { + protocol = "tcp"; + } + + if (protocol.compare("ssl") == 0) + { + secure = " -s "; + } + cout << "testing stringToProxy... " << flush; ostringstream ref; ref << "test" << secure << ":" << protocol << " -t 2000 -p " << port; @@ -58,7 +58,7 @@ allTests(const Ice::CommunicatorPtr& communicator, int port, int lastPort) cout << "testing whether all servers are gone... " << flush; try { - lastObj->_ping(); + lastObj->_ice_ping(); test(false); } catch(const Ice::SocketException&) diff --git a/cpp/test/Ice/locationForward/Server.cpp b/cpp/test/Ice/locationForward/Server.cpp index 4b34b29fcc7..ebcd494fba4 100644 --- a/cpp/test/Ice/locationForward/Server.cpp +++ b/cpp/test/Ice/locationForward/Server.cpp @@ -61,16 +61,16 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) return EXIT_FAILURE; } - ostringstream endpts;
- - Ice::PropertiesPtr properties = communicator->getProperties();
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
+ ostringstream endpts; + + Ice::PropertiesPtr properties = communicator->getProperties(); + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + endpts << protocol << " -p " << port; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts.str()); Ice::ObjectPtr object = new TestI(adapter, fwd); diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp index bef71a088b2..e68f049a2ef 100644 --- a/cpp/test/Ice/objects/AllTests.cpp +++ b/cpp/test/Ice/objects/AllTests.cpp @@ -18,26 +18,26 @@ InitialPrx allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { cout << "testing stringToProxy... " << flush; -
- Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
- string secure;
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- if (protocol.compare("ssl") == 0)
- {
- secure = " -s ";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
- string ref = "initial" + secure + ":" + endpts;
-
+ + Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + string secure; + + if (protocol.empty()) + { + protocol = "tcp"; + } + + if (protocol.compare("ssl") == 0) + { + secure = " -s "; + } + + string endpts = protocol + " -p 12345 -t 2000"; + + string ref = "initial" + secure + ":" + endpts; + Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; @@ -179,13 +179,13 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) cout << "ok" << endl; cout << "checking facet consistency... " << flush; - BPtr fb1 = BPtr::dynamicCast(b1->_findFacet("b1")); + BPtr fb1 = BPtr::dynamicCast(b1->_ice_findFacet("b1")); test(fb1); - BPtr fb2 = BPtr::dynamicCast(b1->_findFacet("b2")); + BPtr fb2 = BPtr::dynamicCast(b1->_ice_findFacet("b2")); test(fb2); - CPtr fc = CPtr::dynamicCast(b1->_findFacet("c")); + CPtr fc = CPtr::dynamicCast(b1->_ice_findFacet("c")); test(fc); - DPtr fd = DPtr::dynamicCast(b1->_findFacet("d")); + DPtr fd = DPtr::dynamicCast(b1->_ice_findFacet("d")); test(fd); test(b1 == fb1); test(fb1->a == fb2); @@ -209,7 +209,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) BPtr::dynamicCast(fb1->a)->b = 0; fb1->a = 0; fb1->b = 0; - fb1->_removeAllFacets(); + fb1->_ice_removeAllFacets(); fb2->a = 0; fb2->b = 0; fb2->c = 0; @@ -246,13 +246,13 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) cout << "ok" << endl; cout << "checking facet consistency... " << flush; - fb1 = BPtr::dynamicCast(b1->_findFacet("b1")); + fb1 = BPtr::dynamicCast(b1->_ice_findFacet("b1")); test(fb1); - fb2 = BPtr::dynamicCast(b1->_findFacet("b2")); + fb2 = BPtr::dynamicCast(b1->_ice_findFacet("b2")); test(fb2); - fc = CPtr::dynamicCast(b1->_findFacet("c")); + fc = CPtr::dynamicCast(b1->_ice_findFacet("c")); test(fc); - fd = DPtr::dynamicCast(b1->_findFacet("d")); + fd = DPtr::dynamicCast(b1->_ice_findFacet("d")); test(fd); test(b1 == fb1); test(b2 == fb2); @@ -278,7 +278,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { fb1->a = 0; fb1->b = 0; - fb1->_removeAllFacets(); + fb1->_ice_removeAllFacets(); fb2->a = 0; fb2->b = 0; fb2->c = 0; diff --git a/cpp/test/Ice/objects/Collocated.cpp b/cpp/test/Ice/objects/Collocated.cpp index 17bef65262b..73797c5cd22 100644 --- a/cpp/test/Ice/objects/Collocated.cpp +++ b/cpp/test/Ice/objects/Collocated.cpp @@ -16,17 +16,17 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + + string endpts = protocol + " -p 12345 -t 2000"; + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); InitialPtr initial = new InitialI(adapter); adapter->add(initial, "initial"); diff --git a/cpp/test/Ice/objects/Server.cpp b/cpp/test/Ice/objects/Server.cpp index e9d357682e4..ae9e7a1fdbb 100644 --- a/cpp/test/Ice/objects/Server.cpp +++ b/cpp/test/Ice/objects/Server.cpp @@ -16,17 +16,17 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + + string endpts = protocol + " -p 12345 -t 2000"; + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); InitialPtr initial = new InitialI(adapter); adapter->add(initial, "initial"); diff --git a/cpp/test/Ice/objects/TestI.cpp b/cpp/test/Ice/objects/TestI.cpp index b3962d8bfb7..118bca866cb 100644 --- a/cpp/test/Ice/objects/TestI.cpp +++ b/cpp/test/Ice/objects/TestI.cpp @@ -44,17 +44,17 @@ InitialI::shutdown() _b1->a = 0; _b1->b = 0; _b1->c = 0; - _b1->_removeAllFacets(); + _b1->_ice_removeAllFacets(); _b2->a = 0; _b2->b = 0; _b2->c = 0; - _b2->_removeAllFacets(); + _b2->_ice_removeAllFacets(); _c->b = 0; - _c->_removeAllFacets(); + _c->_ice_removeAllFacets(); _d->a = 0; _d->b = 0; _d->c = 0; - _d->_removeAllFacets(); + _d->_ice_removeAllFacets(); } BPtr @@ -93,8 +93,8 @@ InitialI::getAll(BPtr& b1, BPtr& b2, CPtr& c, DPtr& d) void InitialI::addFacetsToB1() { - _b1->_addFacet(_b1, "b1"); - _b1->_addFacet(_b2, "b2"); - _b1->_addFacet(_c, "c"); - _b1->_addFacet(_d, "d"); + _b1->_ice_addFacet(_b1, "b1"); + _b1->_ice_addFacet(_b2, "b2"); + _b1->_ice_addFacet(_c, "c"); + _b1->_ice_addFacet(_d, "d"); } diff --git a/cpp/test/Ice/operations/AllTests.cpp b/cpp/test/Ice/operations/AllTests.cpp index 31d4e104cce..56b168a5b97 100644 --- a/cpp/test/Ice/operations/AllTests.cpp +++ b/cpp/test/Ice/operations/AllTests.cpp @@ -17,29 +17,29 @@ using namespace std; Test::MyClassPrx allTests(const Ice::CommunicatorPtr& communicator) { - string ref;
-
- Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
- string secure;
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- if (protocol.compare("ssl") == 0)
- {
- secure = " -s ";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
- ref = "test" + secure + ":" + endpts;
-
- cout << "testing stringToProxy... " << flush;
-
+ string ref; + + Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + string secure; + + if (protocol.empty()) + { + protocol = "tcp"; + } + + if (protocol.compare("ssl") == 0) + { + secure = " -s "; + } + + string endpts = protocol + " -p 12345 -t 2000"; + + ref = "test" + secure + ":" + endpts; + + cout << "testing stringToProxy... " << flush; + Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp index aff78d1f7a1..f9cff35f073 100644 --- a/cpp/test/Ice/operations/Collocated.cpp +++ b/cpp/test/Ice/operations/Collocated.cpp @@ -16,17 +16,17 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + + string endpts = protocol + " -p 12345 -t 2000"; + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new MyDerivedClassI(adapter, "test"); adapter->add(object, "test"); diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp index f05b2d93c2d..0bf6a159aba 100644 --- a/cpp/test/Ice/operations/Server.cpp +++ b/cpp/test/Ice/operations/Server.cpp @@ -16,17 +16,17 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + + string endpts = protocol + " -p 12345 -t 2000"; + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new MyDerivedClassI(adapter, "test"); adapter->add(object, "test"); diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index d3d8683b3c0..6511aad58c7 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -133,23 +133,17 @@ twoways(const Test::MyClassPrx& p) r = p->opMyClass(p, c1, c2); test(c1 == p); test(c2 != p); -// test(r == p); // ASN: Fails! - test(c1->_getIdentity() == "test"); - test(c2->_getIdentity() == "noSuchIdentity"); - test(r->_getIdentity() == "test"); -// r->opVoid(); // ASN: fails + test(r == p); + test(c1->_ice_getIdentity() == "test"); + test(c2->_ice_getIdentity() == "noSuchIdentity"); + test(r->_ice_getIdentity() == "test"); + r->opVoid(); c1->opVoid(); try { c2->opVoid(); test(false); - }
- catch(const Ice::NoEndpointException&)
- {
- // ASN: Due to the same problem as listed for r, this proxy is not secure. It then, in Proxy.cpp line 547, we get
- // as NoEndpointException as the reference is not secure and all secure endpoints (the only ones that should be there)
- // have been culled.
- } + } catch(const Ice::ObjectNotExistException&) { } @@ -157,8 +151,8 @@ twoways(const Test::MyClassPrx& p) r = p->opMyClass(0, c1, c2); test(c1 == 0); test(c2 != 0); -// test(r == p); // ASN: fails -// r->opVoid(); // ASN: fails + test(r == p); + r->opVoid(); try { c1->opVoid(); diff --git a/cpp/test/IcePack/simple/AllTests.cpp b/cpp/test/IcePack/simple/AllTests.cpp index 04868931e57..ac7fb392f76 100644 --- a/cpp/test/IcePack/simple/AllTests.cpp +++ b/cpp/test/IcePack/simple/AllTests.cpp @@ -18,28 +18,28 @@ TestPrx allTests(const Ice::CommunicatorPtr& communicator) { cout << "testing stringToProxy... " << flush; - string ref;
-
- Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
- string secure;
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- if (protocol.compare("ssl") == 0)
- {
- secure = " -s ";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
-
- ref = "test" + secure + ":" + endpts;
-
+ string ref; + + Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + string secure; + + if (protocol.empty()) + { + protocol = "tcp"; + } + + if (protocol.compare("ssl") == 0) + { + secure = " -s "; + } + + string endpts = protocol + " -p 12345 -t 2000"; + + + ref = "test" + secure + ":" + endpts; + Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; @@ -51,7 +51,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "ok" << endl; cout << "pinging server... " << flush; - obj->_ping(); + obj->_ice_ping(); cout << "ok" << endl; return obj; diff --git a/cpp/test/IcePack/simple/Collocated.cpp b/cpp/test/IcePack/simple/Collocated.cpp index 42909b86383..7010e000e9c 100644 --- a/cpp/test/IcePack/simple/Collocated.cpp +++ b/cpp/test/IcePack/simple/Collocated.cpp @@ -16,17 +16,17 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- string endpts = protocol + " -p 12345 -t 2000";
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + + string endpts = protocol + " -p 12345 -t 2000"; + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, "test"); diff --git a/cpp/test/IcePack/simple/Server.cpp b/cpp/test/IcePack/simple/Server.cpp index 516ba100a56..5f0e2947d8a 100644 --- a/cpp/test/IcePack/simple/Server.cpp +++ b/cpp/test/IcePack/simple/Server.cpp @@ -16,17 +16,17 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties();
-
- string protocol = properties->getProperty("Ice.Protocol");
-
- if (protocol.empty())
- {
- protocol = "tcp";
- }
-
- string endpts = protocol + " -p 12345 -t 5000";
-
+ Ice::PropertiesPtr properties = communicator->getProperties(); + + string protocol = properties->getProperty("Ice.Protocol"); + + if (protocol.empty()) + { + protocol = "tcp"; + } + + string endpts = protocol + " -p 12345 -t 5000"; + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, "test"); |