diff options
Diffstat (limited to 'cpp/test/Ice/info/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/info/AllTests.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/cpp/test/Ice/info/AllTests.cpp b/cpp/test/Ice/info/AllTests.cpp index e07414e7816..cb2678bd4d5 100644 --- a/cpp/test/Ice/info/AllTests.cpp +++ b/cpp/test/Ice/info/AllTests.cpp @@ -20,14 +20,14 @@ allTests(const Ice::CommunicatorPtr& communicator) { cout << "testing proxy endpoint information... " << flush; { - Ice::ObjectPrx p1 = + Ice::ObjectPrxPtr p1 = communicator->stringToProxy("test -t:default -h tcphost -p 10000 -t 1200 -z --sourceAddress 10.10.10.10:" "udp -h udphost -p 10001 --interface eth0 --ttl 5 --sourceAddress 10.10.10.10:" "opaque -e 1.8 -t 100 -v ABCD"); Ice::EndpointSeq endps = p1->ice_getEndpoints(); - Ice::IPEndpointInfoPtr ipEndpoint = Ice::IPEndpointInfoPtr::dynamicCast(endps[0]->getInfo()); + Ice::IPEndpointInfoPtr ipEndpoint = ICE_DYNAMIC_CAST(Ice::IPEndpointInfo, endps[0]->getInfo()); test(ipEndpoint); test(ipEndpoint->host == "tcphost"); test(ipEndpoint->port == 10000); @@ -41,12 +41,12 @@ allTests(const Ice::CommunicatorPtr& communicator) (ipEndpoint->type() == IceSSL::EndpointType && ipEndpoint->secure()) || (ipEndpoint->type() == Ice::WSEndpointType && !ipEndpoint->secure()) || (ipEndpoint->type() == Ice::WSSEndpointType && ipEndpoint->secure())); - test((ipEndpoint->type() == Ice::TCPEndpointType && Ice::TCPEndpointInfoPtr::dynamicCast(ipEndpoint)) || - (ipEndpoint->type() == IceSSL::EndpointType && IceSSL::EndpointInfoPtr::dynamicCast(ipEndpoint)) || - (ipEndpoint->type() == Ice::WSEndpointType && Ice::WSEndpointInfoPtr::dynamicCast(ipEndpoint)) || - (ipEndpoint->type() == Ice::WSSEndpointType && IceSSL::WSSEndpointInfoPtr::dynamicCast(ipEndpoint))); + test((ipEndpoint->type() == Ice::TCPEndpointType && ICE_DYNAMIC_CAST(Ice::TCPEndpointInfo, ipEndpoint)) || + (ipEndpoint->type() == IceSSL::EndpointType && ICE_DYNAMIC_CAST(IceSSL::EndpointInfo, ipEndpoint)) || + (ipEndpoint->type() == Ice::WSEndpointType && ICE_DYNAMIC_CAST(Ice::WSEndpointInfo, ipEndpoint)) || + (ipEndpoint->type() == Ice::WSSEndpointType && ICE_DYNAMIC_CAST(IceSSL::WSSEndpointInfo, ipEndpoint))); - Ice::UDPEndpointInfoPtr udpEndpoint = Ice::UDPEndpointInfoPtr::dynamicCast(endps[1]->getInfo()); + Ice::UDPEndpointInfoPtr udpEndpoint = ICE_DYNAMIC_CAST(Ice::UDPEndpointInfo, endps[1]->getInfo()); test(udpEndpoint); test(udpEndpoint->host == "udphost"); test(udpEndpoint->port == 10001); @@ -61,7 +61,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(udpEndpoint->datagram()); test(udpEndpoint->type() == Ice::UDPEndpointType); - Ice::OpaqueEndpointInfoPtr opaqueEndpoint = Ice::OpaqueEndpointInfoPtr::dynamicCast(endps[2]->getInfo()); + Ice::OpaqueEndpointInfoPtr opaqueEndpoint = ICE_DYNAMIC_CAST(Ice::OpaqueEndpointInfo, endps[2]->getInfo()); test(opaqueEndpoint); Ice::EncodingVersion rev; rev.major = 1; @@ -81,7 +81,7 @@ allTests(const Ice::CommunicatorPtr& communicator) Ice::EndpointSeq publishedEndpoints = adapter->getPublishedEndpoints(); test(endpoints == publishedEndpoints); - Ice::IPEndpointInfoPtr ipEndpoint = Ice::IPEndpointInfoPtr::dynamicCast(endpoints[0]->getInfo()); + Ice::IPEndpointInfoPtr ipEndpoint = ICE_DYNAMIC_CAST(Ice::IPEndpointInfo, endpoints[0]->getInfo()); test(ipEndpoint); test(ipEndpoint->type() == Ice::TCPEndpointType || ipEndpoint->type() == IceSSL::EndpointType || ipEndpoint->type() == Ice::WSEndpointType || ipEndpoint->type() == Ice::WSSEndpointType); @@ -89,7 +89,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(ipEndpoint->port > 0); test(ipEndpoint->timeout == 15000); - Ice::UDPEndpointInfoPtr udpEndpoint = Ice::UDPEndpointInfoPtr::dynamicCast(endpoints[1]->getInfo()); + Ice::UDPEndpointInfoPtr udpEndpoint = ICE_DYNAMIC_CAST(Ice::UDPEndpointInfo, endpoints[1]->getInfo()); test(udpEndpoint); test(udpEndpoint->host == "127.0.0.1"); test(udpEndpoint->datagram()); @@ -108,11 +108,11 @@ allTests(const Ice::CommunicatorPtr& communicator) for(Ice::EndpointSeq::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p) { - ipEndpoint = Ice::IPEndpointInfoPtr::dynamicCast((*p)->getInfo()); + ipEndpoint = ICE_DYNAMIC_CAST(Ice::IPEndpointInfo, (*p)->getInfo()); test(ipEndpoint->port == 12020); } - ipEndpoint = Ice::IPEndpointInfoPtr::dynamicCast(publishedEndpoints[0]->getInfo()); + ipEndpoint = ICE_DYNAMIC_CAST(Ice::IPEndpointInfo, publishedEndpoints[0]->getInfo()); test(ipEndpoint->host == "127.0.0.1"); test(ipEndpoint->port == 12020); @@ -120,13 +120,13 @@ allTests(const Ice::CommunicatorPtr& communicator) } cout << "ok" << endl; - Ice::ObjectPrx base = communicator->stringToProxy("test:default -p 12010:udp -p 12010 -c"); - TestIntfPrx testIntf = TestIntfPrx::checkedCast(base); + Ice::ObjectPrxPtr base = communicator->stringToProxy("test:default -p 12010:udp -p 12010 -c"); + TestIntfPrxPtr testIntf = ICE_CHECKED_CAST(TestIntfPrx, base); cout << "test connection endpoint information... " << flush; { Ice::EndpointInfoPtr info = base->ice_getConnection()->getEndpoint()->getInfo(); - Ice::IPEndpointInfoPtr ipinfo = Ice::IPEndpointInfoPtr::dynamicCast(info); + Ice::IPEndpointInfoPtr ipinfo = ICE_DYNAMIC_CAST(Ice::IPEndpointInfo, info); test(ipinfo->port == 12010); test(!ipinfo->compress); test(ipinfo->host == defaultHost); @@ -142,7 +142,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(port > 0); info = base->ice_datagram()->ice_getConnection()->getEndpoint()->getInfo(); - Ice::UDPEndpointInfoPtr udp = Ice::UDPEndpointInfoPtr::dynamicCast(info); + Ice::UDPEndpointInfoPtr udp = ICE_DYNAMIC_CAST(Ice::UDPEndpointInfo, info); test(udp); test(udp->port == 12010); test(udp->host == defaultHost); @@ -154,7 +154,7 @@ allTests(const Ice::CommunicatorPtr& communicator) Ice::ConnectionPtr connection = base->ice_getConnection(); connection->setBufferSize(1024, 2048); - Ice::IPConnectionInfoPtr info = Ice::IPConnectionInfoPtr::dynamicCast(connection->getInfo()); + Ice::IPConnectionInfoPtr info = ICE_DYNAMIC_CAST(Ice::IPConnectionInfo, connection->getInfo()); test(info); test(!info->incoming); test(info->adapterName.empty()); @@ -188,13 +188,13 @@ allTests(const Ice::CommunicatorPtr& communicator) { Ice::HeaderDict headers; - Ice::WSConnectionInfoPtr wsinfo = Ice::WSConnectionInfoPtr::dynamicCast(info); + Ice::WSConnectionInfoPtr wsinfo = ICE_DYNAMIC_CAST(Ice::WSConnectionInfo, info); if(wsinfo) { headers = wsinfo->headers; } - IceSSL::WSSConnectionInfoPtr wssinfo = IceSSL::WSSConnectionInfoPtr::dynamicCast(info); + IceSSL::WSSConnectionInfoPtr wssinfo = ICE_DYNAMIC_CAST(IceSSL::WSSConnectionInfo, info); if(wssinfo) { headers = wssinfo->headers; @@ -219,7 +219,7 @@ allTests(const Ice::CommunicatorPtr& communicator) connection = base->ice_datagram()->ice_getConnection(); connection->setBufferSize(2048, 1024); - info = Ice::IPConnectionInfoPtr::dynamicCast(connection->getInfo()); + info = ICE_DYNAMIC_CAST(Ice::IPConnectionInfo, connection->getInfo()); test(!info->incoming); test(info->adapterName.empty()); test(info->localPort > 0); |