summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/operations
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/operations')
-rw-r--r--cpp/test/Ice/operations/AllTests.cpp44
-rw-r--r--cpp/test/Ice/operations/BatchOneways.cpp36
-rw-r--r--cpp/test/Ice/operations/Client.cpp68
-rw-r--r--cpp/test/Ice/operations/Collocated.cpp30
-rw-r--r--cpp/test/Ice/operations/Server.cpp32
-rw-r--r--cpp/test/Ice/operations/ServerAMD.cpp32
-rw-r--r--cpp/test/Ice/operations/Test.ice44
-rw-r--r--cpp/test/Ice/operations/TestAMD.ice44
-rw-r--r--cpp/test/Ice/operations/TestAMDI.cpp168
-rw-r--r--cpp/test/Ice/operations/TestAMDI.h110
-rw-r--r--cpp/test/Ice/operations/TestI.cpp168
-rw-r--r--cpp/test/Ice/operations/TestI.h152
-rw-r--r--cpp/test/Ice/operations/Twoways.cpp1252
-rw-r--r--cpp/test/Ice/operations/TwowaysAMI.cpp1474
14 files changed, 1827 insertions, 1827 deletions
diff --git a/cpp/test/Ice/operations/AllTests.cpp b/cpp/test/Ice/operations/AllTests.cpp
index 7f592a449fd..15df53511d6 100644
--- a/cpp/test/Ice/operations/AllTests.cpp
+++ b/cpp/test/Ice/operations/AllTests.cpp
@@ -202,17 +202,17 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
if(!collocated)
{
- cout << "testing timeout... " << flush;
- Test::MyClassPrx clTimeout = Test::MyClassPrx::uncheckedCast(cl->ice_timeout(500));
- try
- {
- clTimeout->opSleep(2000);
- test(false);
- }
- catch(const Ice::TimeoutException&)
- {
- }
- cout << "ok" << endl;
+ cout << "testing timeout... " << flush;
+ Test::MyClassPrx clTimeout = Test::MyClassPrx::uncheckedCast(cl->ice_timeout(500));
+ try
+ {
+ clTimeout->opSleep(2000);
+ test(false);
+ }
+ catch(const Ice::TimeoutException&)
+ {
+ }
+ cout << "ok" << endl;
}
cout << "testing twoway operations... " << flush;
@@ -224,17 +224,17 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
if(!collocated)
{
- cout << "testing twoway operations with AMI... " << flush;
- void twowaysAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrx&);
- twowaysAMI(communicator, cl);
- twowaysAMI(communicator, derived);
- cout << "ok" << endl;
-
- cout << "testing batch oneway operations... " << flush;
- void batchOneways(const Test::MyClassPrx&);
- batchOneways(cl);
- batchOneways(derived);
- cout << "ok" << endl;
+ cout << "testing twoway operations with AMI... " << flush;
+ void twowaysAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrx&);
+ twowaysAMI(communicator, cl);
+ twowaysAMI(communicator, derived);
+ cout << "ok" << endl;
+
+ cout << "testing batch oneway operations... " << flush;
+ void batchOneways(const Test::MyClassPrx&);
+ batchOneways(cl);
+ batchOneways(derived);
+ cout << "ok" << endl;
}
return cl;
diff --git a/cpp/test/Ice/operations/BatchOneways.cpp b/cpp/test/Ice/operations/BatchOneways.cpp
index 0556e8bb722..d0394e5cd51 100644
--- a/cpp/test/Ice/operations/BatchOneways.cpp
+++ b/cpp/test/Ice/operations/BatchOneways.cpp
@@ -22,32 +22,32 @@ batchOneways(const Test::MyClassPrx& p)
try
{
- p->opByteSOneway(bs1);
- test(true);
+ p->opByteSOneway(bs1);
+ test(true);
}
catch(const Ice::MemoryLimitException&)
{
- test(false);
+ test(false);
}
try
{
- p->opByteSOneway(bs2);
- test(true);
+ p->opByteSOneway(bs2);
+ test(true);
}
catch(const Ice::MemoryLimitException&)
{
- test(false);
+ test(false);
}
try
{
- p->opByteSOneway(bs3);
- test(false);
+ p->opByteSOneway(bs3);
+ test(false);
}
catch(const Ice::MemoryLimitException&)
{
- test(true);
+ test(true);
}
Test::MyClassPrx batch = Test::MyClassPrx::uncheckedCast(p->ice_batchOneway());
@@ -56,15 +56,15 @@ batchOneways(const Test::MyClassPrx& p)
for(i = 0 ; i < 30 ; ++i)
{
- try
- {
- batch->opByteSOneway(bs1);
- test(true);
- }
- catch(const Ice::MemoryLimitException&)
- {
- test(false);
- }
+ try
+ {
+ batch->opByteSOneway(bs1);
+ test(true);
+ }
+ catch(const Ice::MemoryLimitException&)
+ {
+ test(false);
+ }
}
batch->ice_getConnection()->flushBatchRequests();
diff --git a/cpp/test/Ice/operations/Client.cpp b/cpp/test/Ice/operations/Client.cpp
index 7e7cceb914d..b421a629cf5 100644
--- a/cpp/test/Ice/operations/Client.cpp
+++ b/cpp/test/Ice/operations/Client.cpp
@@ -25,12 +25,12 @@ run(int argc, char* argv[],
myClass->shutdown();
try
{
- myClass->opVoid();
- test(false);
+ myClass->opVoid();
+ test(false);
}
catch(const Ice::LocalException&)
{
- cout << "ok" << endl;
+ cout << "ok" << endl;
}
return EXIT_SUCCESS;
@@ -44,47 +44,47 @@ main(int argc, char* argv[])
try
{
- //
- // In this test, we need at least two threads in the
- // client side thread pool for nested AMI.
- //
- Ice::InitializationData initData;
- initData.properties = Ice::createProperties(argc, argv);
- initData.properties->setProperty("Ice.ThreadPool.Client.Size", "2");
- initData.properties->setProperty("Ice.ThreadPool.Client.SizeWarn", "0");
+ //
+ // In this test, we need at least two threads in the
+ // client side thread pool for nested AMI.
+ //
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ initData.properties->setProperty("Ice.ThreadPool.Client.Size", "2");
+ initData.properties->setProperty("Ice.ThreadPool.Client.SizeWarn", "0");
- //
- // We must set MessageSizeMax to an explicit values, because
- // we run tests to check whether Ice.MemoryLimitException is
- // raised as expected.
- //
- initData.properties->setProperty("Ice.MessageSizeMax", "100");
+ //
+ // We must set MessageSizeMax to an explicit values, because
+ // we run tests to check whether Ice.MemoryLimitException is
+ // raised as expected.
+ //
+ initData.properties->setProperty("Ice.MessageSizeMax", "100");
- //
- // We don't want connection warnings because of the timeout test.
- //
- initData.properties->setProperty("Ice.Warn.Connections", "0");
+ //
+ // We don't want connection warnings because of the timeout test.
+ //
+ initData.properties->setProperty("Ice.Warn.Connections", "0");
- communicator = Ice::initialize(argc, argv, initData);
- status = run(argc, argv, communicator, initData);
+ communicator = Ice::initialize(argc, argv, initData);
+ status = run(argc, argv, communicator, initData);
}
catch(const Ice::Exception& ex)
{
- cerr << ex << endl;
- status = EXIT_FAILURE;
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
}
if(communicator)
{
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
}
return status;
diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp
index dda296e4cae..784cee66f14 100644
--- a/cpp/test/Ice/operations/Collocated.cpp
+++ b/cpp/test/Ice/operations/Collocated.cpp
@@ -37,28 +37,28 @@ main(int argc, char* argv[])
try
{
- Ice::InitializationData initData;
- initData.properties = Ice::createProperties(argc, argv);
- communicator = Ice::initialize(argc, argv, initData);
- status = run(argc, argv, communicator, initData);
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ communicator = Ice::initialize(argc, argv, initData);
+ status = run(argc, argv, communicator, initData);
}
catch(const Ice::Exception& ex)
{
- cerr << ex << endl;
- status = EXIT_FAILURE;
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
}
if(communicator)
{
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
}
return status;
diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp
index 9e4e511dad9..85979d7424f 100644
--- a/cpp/test/Ice/operations/Server.cpp
+++ b/cpp/test/Ice/operations/Server.cpp
@@ -34,30 +34,30 @@ main(int argc, char* argv[])
try
{
- Ice::InitializationData initData;
- initData.properties = Ice::createProperties(argc, argv);
- initData.properties->setProperty("Ice.Warn.Connections", "0");
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ initData.properties->setProperty("Ice.Warn.Connections", "0");
- communicator = Ice::initialize(argc, argv, initData);
- status = run(argc, argv, communicator);
+ communicator = Ice::initialize(argc, argv, initData);
+ status = run(argc, argv, communicator);
}
catch(const Ice::Exception& ex)
{
- cerr << ex << endl;
- status = EXIT_FAILURE;
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
}
if(communicator)
{
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
}
return status;
diff --git a/cpp/test/Ice/operations/ServerAMD.cpp b/cpp/test/Ice/operations/ServerAMD.cpp
index 251d5068424..0cac6d02a18 100644
--- a/cpp/test/Ice/operations/ServerAMD.cpp
+++ b/cpp/test/Ice/operations/ServerAMD.cpp
@@ -34,30 +34,30 @@ main(int argc, char* argv[])
try
{
- Ice::InitializationData initData;
- initData.properties = Ice::createProperties(argc, argv);
- initData.properties->setProperty("Ice.Warn.Connections", "0");
- communicator = Ice::initialize(argc, argv, initData);
- status = run(argc, argv, communicator);
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ initData.properties->setProperty("Ice.Warn.Connections", "0");
+ communicator = Ice::initialize(argc, argv, initData);
+ status = run(argc, argv, communicator);
}
catch(const Ice::Exception& ex)
{
- cerr << ex << endl;
- status = EXIT_FAILURE;
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
}
if(communicator)
{
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
}
return status;
diff --git a/cpp/test/Ice/operations/Test.ice b/cpp/test/Ice/operations/Test.ice
index d655feb0599..043060a5d93 100644
--- a/cpp/test/Ice/operations/Test.ice
+++ b/cpp/test/Ice/operations/Test.ice
@@ -75,75 +75,75 @@ dictionary<string, MyEnum> StringMyEnumD;
void opSleep(int duration);
byte opByte(byte p1, byte p2,
- out byte p3);
+ out byte p3);
bool opBool(bool p1, bool p2,
- out bool p3);
+ out bool p3);
long opShortIntLong(short p1, int p2, long p3,
- out short p4, out int p5, out long p6);
+ out short p4, out int p5, out long p6);
double opFloatDouble(float p1, double p2,
- out float p3, out double p4);
+ out float p3, out double p4);
string opString(string p1, string p2,
- out string p3);
+ out string p3);
MyEnum opMyEnum(MyEnum p1, out MyEnum p2);
MyClass* opMyClass(MyClass* p1, out MyClass* p2, out MyClass* p3);
Structure opStruct(Structure p1, Structure p2,
- out Structure p3);
+ out Structure p3);
ByteS opByteS(ByteS p1, ByteS p2,
- out ByteS p3);
+ out ByteS p3);
BoolS opBoolS(BoolS p1, BoolS p2,
- out BoolS p3);
+ out BoolS p3);
LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3,
- out ::Test::ShortS p4, out IntS p5, out LongS p6);
+ out ::Test::ShortS p4, out IntS p5, out LongS p6);
DoubleS opFloatDoubleS(FloatS p1, DoubleS p2,
- out FloatS p3, out DoubleS p4);
+ out FloatS p3, out DoubleS p4);
StringS opStringS(StringS p1, StringS p2,
- out StringS p3);
+ out StringS p3);
ByteSS opByteSS(ByteSS p1, ByteSS p2,
- out ByteSS p3);
+ out ByteSS p3);
BoolSS opBoolSS(BoolSS p1, BoolSS p2,
- out BoolSS p3);
+ out BoolSS p3);
LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3,
- out ShortSS p4, out IntSS p5, out LongSS p6);
+ out ShortSS p4, out IntSS p5, out LongSS p6);
DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2,
- out FloatSS p3, out DoubleSS p4);
+ out FloatSS p3, out DoubleSS p4);
StringSS opStringSS(StringSS p1, StringSS p2,
- out StringSS p3);
+ out StringSS p3);
StringSSS opStringSSS(StringSSS p1, StringSSS p2,
- out StringSSS p3);
+ out StringSSS p3);
ByteBoolD opByteBoolD(ByteBoolD p1, ByteBoolD p2,
- out ByteBoolD p3);
+ out ByteBoolD p3);
ShortIntD opShortIntD(ShortIntD p1, ShortIntD p2,
- out ShortIntD p3);
+ out ShortIntD p3);
LongFloatD opLongFloatD(LongFloatD p1, LongFloatD p2,
- out LongFloatD p3);
+ out LongFloatD p3);
StringStringD opStringStringD(StringStringD p1, StringStringD p2,
- out StringStringD p3);
+ out StringStringD p3);
StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2,
- out StringMyEnumD p3);
+ out StringMyEnumD p3);
IntS opIntS(IntS s);
diff --git a/cpp/test/Ice/operations/TestAMD.ice b/cpp/test/Ice/operations/TestAMD.ice
index 1d58252d323..9bdc8c6fe3b 100644
--- a/cpp/test/Ice/operations/TestAMD.ice
+++ b/cpp/test/Ice/operations/TestAMD.ice
@@ -75,75 +75,75 @@ dictionary<string, MyEnum> StringMyEnumD;
void opSleep(int duration);
byte opByte(byte p1, byte p2,
- out byte p3);
+ out byte p3);
bool opBool(bool p1, bool p2,
- out bool p3);
+ out bool p3);
long opShortIntLong(short p1, int p2, long p3,
- out short p4, out int p5, out long p6);
+ out short p4, out int p5, out long p6);
double opFloatDouble(float p1, double p2,
- out float p3, out double p4);
+ out float p3, out double p4);
string opString(string p1, string p2,
- out string p3);
+ out string p3);
MyEnum opMyEnum(MyEnum p1, out MyEnum p2);
MyClass* opMyClass(MyClass* p1, out MyClass* p2, out MyClass* p3);
Structure opStruct(Structure p1, Structure p2,
- out Structure p3);
+ out Structure p3);
ByteS opByteS(ByteS p1, ByteS p2,
- out ByteS p3);
+ out ByteS p3);
BoolS opBoolS(BoolS p1, BoolS p2,
- out BoolS p3);
+ out BoolS p3);
LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3,
- out ::Test::ShortS p4, out IntS p5, out LongS p6);
+ out ::Test::ShortS p4, out IntS p5, out LongS p6);
DoubleS opFloatDoubleS(FloatS p1, DoubleS p2,
- out FloatS p3, out DoubleS p4);
+ out FloatS p3, out DoubleS p4);
StringS opStringS(StringS p1, StringS p2,
- out StringS p3);
+ out StringS p3);
ByteSS opByteSS(ByteSS p1, ByteSS p2,
- out ByteSS p3);
+ out ByteSS p3);
BoolSS opBoolSS(BoolSS p1, BoolSS p2,
- out BoolSS p3);
+ out BoolSS p3);
LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3,
- out ShortSS p4, out IntSS p5, out LongSS p6);
+ out ShortSS p4, out IntSS p5, out LongSS p6);
DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2,
- out FloatSS p3, out DoubleSS p4);
+ out FloatSS p3, out DoubleSS p4);
StringSS opStringSS(StringSS p1, StringSS p2,
- out StringSS p3);
+ out StringSS p3);
StringSSS opStringSSS(StringSSS p1, StringSSS p2,
- out StringSSS p3);
+ out StringSSS p3);
ByteBoolD opByteBoolD(ByteBoolD p1, ByteBoolD p2,
- out ByteBoolD p3);
+ out ByteBoolD p3);
ShortIntD opShortIntD(ShortIntD p1, ShortIntD p2,
- out ShortIntD p3);
+ out ShortIntD p3);
LongFloatD opLongFloatD(LongFloatD p1, LongFloatD p2,
- out LongFloatD p3);
+ out LongFloatD p3);
StringStringD opStringStringD(StringStringD p1, StringStringD p2,
- out StringStringD p3);
+ out StringStringD p3);
StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2,
- out StringMyEnumD p3);
+ out StringMyEnumD p3);
IntS opIntS(IntS s);
diff --git a/cpp/test/Ice/operations/TestAMDI.cpp b/cpp/test/Ice/operations/TestAMDI.cpp
index 48cb26beeed..028993f910a 100644
--- a/cpp/test/Ice/operations/TestAMDI.cpp
+++ b/cpp/test/Ice/operations/TestAMDI.cpp
@@ -20,13 +20,13 @@ class Thread_opVoid : public IceUtil::Thread
public:
Thread_opVoid(const Test::AMD_MyClass_opVoidPtr& cb) :
- _cb(cb)
+ _cb(cb)
{
}
virtual void run()
{
- _cb->ice_response();
+ _cb->ice_response();
}
private:
@@ -45,8 +45,8 @@ MyDerivedClassI::shutdown_async(const Test::AMD_MyClass_shutdownPtr& cb, const I
{
if(_opVoidThread)
{
- _opVoidThread->getThreadControl().join();
- _opVoidThread = 0;
+ _opVoidThread->getThreadControl().join();
+ _opVoidThread = 0;
}
_adapter->getCommunicator()->shutdown();
@@ -58,8 +58,8 @@ MyDerivedClassI::opVoid_async(const Test::AMD_MyClass_opVoidPtr& cb, const Ice::
{
if(_opVoidThread)
{
- _opVoidThread->getThreadControl().join();
- _opVoidThread = 0;
+ _opVoidThread->getThreadControl().join();
+ _opVoidThread = 0;
}
_opVoidThread = new Thread_opVoid(cb);
@@ -68,8 +68,8 @@ MyDerivedClassI::opVoid_async(const Test::AMD_MyClass_opVoidPtr& cb, const Ice::
void
MyDerivedClassI::opSleep_async(const Test::AMD_MyClass_opSleepPtr& cb,
- int duration,
- const Ice::Current&)
+ int duration,
+ const Ice::Current&)
{
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(duration));
cb->ice_response();
@@ -77,74 +77,74 @@ MyDerivedClassI::opSleep_async(const Test::AMD_MyClass_opSleepPtr& cb,
void
MyDerivedClassI::opByte_async(const Test::AMD_MyClass_opBytePtr& cb,
- Ice::Byte p1,
- Ice::Byte p2,
- const Ice::Current&)
+ Ice::Byte p1,
+ Ice::Byte p2,
+ const Ice::Current&)
{
cb->ice_response(p1, p1 ^ p2);
}
void
MyDerivedClassI::opBool_async(const Test::AMD_MyClass_opBoolPtr& cb,
- bool p1,
- bool p2,
- const Ice::Current&)
+ bool p1,
+ bool p2,
+ const Ice::Current&)
{
cb->ice_response(p2, p1);
}
void
MyDerivedClassI::opShortIntLong_async(const Test::AMD_MyClass_opShortIntLongPtr& cb,
- Ice::Short p1,
- Ice::Int p2,
- Ice::Long p3,
- const Ice::Current&)
+ Ice::Short p1,
+ Ice::Int p2,
+ Ice::Long p3,
+ const Ice::Current&)
{
cb->ice_response(p3, p1, p2, p3);
}
void
MyDerivedClassI::opFloatDouble_async(const Test::AMD_MyClass_opFloatDoublePtr& cb,
- Ice::Float p1,
- Ice::Double p2,
- const Ice::Current&)
+ Ice::Float p1,
+ Ice::Double p2,
+ const Ice::Current&)
{
cb->ice_response(p2, p1, p2);
}
void
MyDerivedClassI::opString_async(const Test::AMD_MyClass_opStringPtr& cb,
- const std::string& p1,
- const std::string& p2,
- const Ice::Current&)
+ const std::string& p1,
+ const std::string& p2,
+ const Ice::Current&)
{
cb->ice_response(p1 + " " + p2, p2 + " " + p1);
}
void
MyDerivedClassI::opMyEnum_async(const Test::AMD_MyClass_opMyEnumPtr& cb,
- Test::MyEnum p1,
- const Ice::Current&)
+ Test::MyEnum p1,
+ const Ice::Current&)
{
cb->ice_response(Test::enum3, p1);
}
void
MyDerivedClassI::opMyClass_async(const Test::AMD_MyClass_opMyClassPtr& cb,
- const Test::MyClassPrx& p1,
- const Ice::Current&)
+ const Test::MyClassPrx& p1,
+ const Ice::Current&)
{
Test::MyClassPrx p2 = p1;
Test::MyClassPrx p3 = Test::MyClassPrx::uncheckedCast(_adapter->createProxy(
- _adapter->getCommunicator()->stringToIdentity("noSuchIdentity")));
+ _adapter->getCommunicator()->stringToIdentity("noSuchIdentity")));
cb->ice_response(Test::MyClassPrx::uncheckedCast(_adapter->createProxy(_identity)), p2, p3);
}
void
MyDerivedClassI::opStruct_async(const Test::AMD_MyClass_opStructPtr& cb,
- const Test::Structure& p1,
- const Test::Structure& p2,
- const Ice::Current&)
+ const Test::Structure& p1,
+ const Test::Structure& p2,
+ const Ice::Current&)
{
Test::Structure p3 = p1;
p3.s.s = "a new string";
@@ -153,9 +153,9 @@ MyDerivedClassI::opStruct_async(const Test::AMD_MyClass_opStructPtr& cb,
void
MyDerivedClassI::opByteS_async(const Test::AMD_MyClass_opByteSPtr& cb,
- const Test::ByteS& p1,
- const Test::ByteS& p2,
- const Ice::Current&)
+ const Test::ByteS& p1,
+ const Test::ByteS& p2,
+ const Ice::Current&)
{
Test::ByteS p3;
p3.resize(p1.size());
@@ -167,9 +167,9 @@ MyDerivedClassI::opByteS_async(const Test::AMD_MyClass_opByteSPtr& cb,
void
MyDerivedClassI::opBoolS_async(const Test::AMD_MyClass_opBoolSPtr& cb,
- const Test::BoolS& p1,
- const Test::BoolS& p2,
- const Ice::Current&)
+ const Test::BoolS& p1,
+ const Test::BoolS& p2,
+ const Ice::Current&)
{
Test::BoolS p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -181,10 +181,10 @@ MyDerivedClassI::opBoolS_async(const Test::AMD_MyClass_opBoolSPtr& cb,
void
MyDerivedClassI::opShortIntLongS_async(const Test::AMD_MyClass_opShortIntLongSPtr& cb,
- const Test::ShortS& p1,
- const Test::IntS& p2,
- const Test::LongS& p3,
- const Ice::Current&)
+ const Test::ShortS& p1,
+ const Test::IntS& p2,
+ const Test::LongS& p3,
+ const Ice::Current&)
{
Test::ShortS p4 = p1;
Test::IntS p5;
@@ -197,9 +197,9 @@ MyDerivedClassI::opShortIntLongS_async(const Test::AMD_MyClass_opShortIntLongSPt
void
MyDerivedClassI::opFloatDoubleS_async(const Test::AMD_MyClass_opFloatDoubleSPtr& cb,
- const Test::FloatS& p1,
- const Test::DoubleS& p2,
- const Ice::Current&)
+ const Test::FloatS& p1,
+ const Test::DoubleS& p2,
+ const Ice::Current&)
{
Test::FloatS p3 = p1;
Test::DoubleS p4;
@@ -212,9 +212,9 @@ MyDerivedClassI::opFloatDoubleS_async(const Test::AMD_MyClass_opFloatDoubleSPtr&
void
MyDerivedClassI::opStringS_async(const Test::AMD_MyClass_opStringSPtr& cb,
- const Test::StringS& p1,
- const Test::StringS& p2,
- const Ice::Current&)
+ const Test::StringS& p1,
+ const Test::StringS& p2,
+ const Ice::Current&)
{
Test::StringS p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -226,9 +226,9 @@ MyDerivedClassI::opStringS_async(const Test::AMD_MyClass_opStringSPtr& cb,
void
MyDerivedClassI::opByteSS_async(const Test::AMD_MyClass_opByteSSPtr& cb,
- const Test::ByteSS& p1,
- const Test::ByteSS& p2,
- const Ice::Current&)
+ const Test::ByteSS& p1,
+ const Test::ByteSS& p2,
+ const Ice::Current&)
{
Test::ByteSS p3;
p3.resize(p1.size());
@@ -240,9 +240,9 @@ MyDerivedClassI::opByteSS_async(const Test::AMD_MyClass_opByteSSPtr& cb,
void
MyDerivedClassI::opBoolSS_async(const Test::AMD_MyClass_opBoolSSPtr& cb,
- const Test::BoolSS& p1,
- const Test::BoolSS& p2,
- const Ice::Current&)
+ const Test::BoolSS& p1,
+ const Test::BoolSS& p2,
+ const Ice::Current&)
{
Test::BoolSS p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -254,10 +254,10 @@ MyDerivedClassI::opBoolSS_async(const Test::AMD_MyClass_opBoolSSPtr& cb,
void
MyDerivedClassI::opShortIntLongSS_async(const Test::AMD_MyClass_opShortIntLongSSPtr& cb,
- const Test::ShortSS& p1,
- const Test::IntSS& p2,
- const Test::LongSS& p3,
- const Ice::Current&)
+ const Test::ShortSS& p1,
+ const Test::IntSS& p2,
+ const Test::LongSS& p3,
+ const Ice::Current&)
{
Test::ShortSS p4 = p1;
Test::IntSS p5;
@@ -270,9 +270,9 @@ MyDerivedClassI::opShortIntLongSS_async(const Test::AMD_MyClass_opShortIntLongSS
void
MyDerivedClassI::opFloatDoubleSS_async(const Test::AMD_MyClass_opFloatDoubleSSPtr& cb,
- const Test::FloatSS& p1,
- const Test::DoubleSS& p2,
- const Ice::Current&)
+ const Test::FloatSS& p1,
+ const Test::DoubleSS& p2,
+ const Ice::Current&)
{
Test::FloatSS p3 = p1;
Test::DoubleSS p4;
@@ -285,9 +285,9 @@ MyDerivedClassI::opFloatDoubleSS_async(const Test::AMD_MyClass_opFloatDoubleSSPt
void
MyDerivedClassI::opStringSS_async(const Test::AMD_MyClass_opStringSSPtr& cb,
- const Test::StringSS& p1,
- const Test::StringSS& p2,
- const Ice::Current&)
+ const Test::StringSS& p1,
+ const Test::StringSS& p2,
+ const Ice::Current&)
{
Test::StringSS p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -299,9 +299,9 @@ MyDerivedClassI::opStringSS_async(const Test::AMD_MyClass_opStringSSPtr& cb,
void
MyDerivedClassI::opStringSSS_async(const Test::AMD_MyClass_opStringSSSPtr& cb,
- const Test::StringSSS& p1,
- const Test::StringSSS& p2,
- const Ice::Current&)
+ const Test::StringSSS& p1,
+ const Test::StringSSS& p2,
+ const Ice::Current&)
{
Test::StringSSS p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -313,9 +313,9 @@ MyDerivedClassI::opStringSSS_async(const Test::AMD_MyClass_opStringSSSPtr& cb,
void
MyDerivedClassI::opByteBoolD_async(const Test::AMD_MyClass_opByteBoolDPtr& cb,
- const Test::ByteBoolD& p1,
- const Test::ByteBoolD& p2,
- const Ice::Current&)
+ const Test::ByteBoolD& p1,
+ const Test::ByteBoolD& p2,
+ const Ice::Current&)
{
Test::ByteBoolD p3 = p1;
Test::ByteBoolD r = p1;
@@ -325,9 +325,9 @@ MyDerivedClassI::opByteBoolD_async(const Test::AMD_MyClass_opByteBoolDPtr& cb,
void
MyDerivedClassI::opShortIntD_async(const Test::AMD_MyClass_opShortIntDPtr& cb,
- const Test::ShortIntD& p1,
- const Test::ShortIntD& p2,
- const Ice::Current&)
+ const Test::ShortIntD& p1,
+ const Test::ShortIntD& p2,
+ const Ice::Current&)
{
Test::ShortIntD p3 = p1;
Test::ShortIntD r = p1;
@@ -337,9 +337,9 @@ MyDerivedClassI::opShortIntD_async(const Test::AMD_MyClass_opShortIntDPtr& cb,
void
MyDerivedClassI::opLongFloatD_async(const Test::AMD_MyClass_opLongFloatDPtr& cb,
- const Test::LongFloatD& p1,
- const Test::LongFloatD& p2,
- const Ice::Current&)
+ const Test::LongFloatD& p1,
+ const Test::LongFloatD& p2,
+ const Ice::Current&)
{
Test::LongFloatD p3 = p1;
Test::LongFloatD r = p1;
@@ -349,9 +349,9 @@ MyDerivedClassI::opLongFloatD_async(const Test::AMD_MyClass_opLongFloatDPtr& cb,
void
MyDerivedClassI::opStringStringD_async(const Test::AMD_MyClass_opStringStringDPtr& cb,
- const Test::StringStringD& p1,
- const Test::StringStringD& p2,
- const Ice::Current&)
+ const Test::StringStringD& p1,
+ const Test::StringStringD& p2,
+ const Ice::Current&)
{
Test::StringStringD p3 = p1;
Test::StringStringD r = p1;
@@ -361,9 +361,9 @@ MyDerivedClassI::opStringStringD_async(const Test::AMD_MyClass_opStringStringDPt
void
MyDerivedClassI::opStringMyEnumD_async(const Test::AMD_MyClass_opStringMyEnumDPtr& cb,
- const Test::StringMyEnumD& p1,
- const Test::StringMyEnumD& p2,
- const Ice::Current&)
+ const Test::StringMyEnumD& p1,
+ const Test::StringMyEnumD& p2,
+ const Ice::Current&)
{
Test::StringMyEnumD p3 = p1;
Test::StringMyEnumD r = p1;
@@ -381,7 +381,7 @@ MyDerivedClassI::opIntS_async(const Test::AMD_MyClass_opIntSPtr& cb, const Test:
void
MyDerivedClassI::opByteSOneway_async(const Test::AMD_MyClass_opByteSOnewayPtr& cb, const Test::ByteS& s,
- const Ice::Current&)
+ const Ice::Current&)
{
cb->ice_response();
}
@@ -395,7 +395,7 @@ MyDerivedClassI::opContext_async(const Test::AMD_MyClass_opContextPtr& cb, const
void
MyDerivedClassI::opDoubleMarshaling_async(const Test::AMD_MyClass_opDoubleMarshalingPtr& cb,
- Ice::Double p1, const Test::DoubleS& p2, const Ice::Current&)
+ Ice::Double p1, const Test::DoubleS& p2, const Ice::Current&)
{
Ice::Double d = 1278312346.0 / 13.0;
test(p1 == d);
diff --git a/cpp/test/Ice/operations/TestAMDI.h b/cpp/test/Ice/operations/TestAMDI.h
index 19c3313bfdb..87098048a1e 100644
--- a/cpp/test/Ice/operations/TestAMDI.h
+++ b/cpp/test/Ice/operations/TestAMDI.h
@@ -20,123 +20,123 @@ public:
MyDerivedClassI(const Ice::ObjectAdapterPtr&, const Ice::Identity&);
virtual void shutdown_async(const Test::AMD_MyClass_shutdownPtr&,
- const Ice::Current&);
+ const Ice::Current&);
virtual void opVoid_async(const Test::AMD_MyClass_opVoidPtr&,
- const Ice::Current&);
+ const Ice::Current&);
virtual void opSleep_async(const Test::AMD_MyClass_opSleepPtr&,
- int,
- const Ice::Current&);
+ int,
+ const Ice::Current&);
virtual void opByte_async(const Test::AMD_MyClass_opBytePtr&,
- Ice::Byte, Ice::Byte,
- const Ice::Current&);
+ Ice::Byte, Ice::Byte,
+ const Ice::Current&);
virtual void opBool_async(const Test::AMD_MyClass_opBoolPtr&,
- bool, bool,
- const Ice::Current&);
+ bool, bool,
+ const Ice::Current&);
virtual void opShortIntLong_async(const Test::AMD_MyClass_opShortIntLongPtr&,
- Ice::Short, Ice::Int, Ice::Long,
- const Ice::Current&);
+ Ice::Short, Ice::Int, Ice::Long,
+ const Ice::Current&);
virtual void opFloatDouble_async(const Test::AMD_MyClass_opFloatDoublePtr&,
- Ice::Float, Ice::Double,
- const Ice::Current&);
+ Ice::Float, Ice::Double,
+ const Ice::Current&);
virtual void opString_async(const Test::AMD_MyClass_opStringPtr&,
- const std::string&, const std::string&,
- const Ice::Current&);
+ const std::string&, const std::string&,
+ const Ice::Current&);
virtual void opMyEnum_async(const Test::AMD_MyClass_opMyEnumPtr&,
- Test::MyEnum,
- const Ice::Current&);
+ Test::MyEnum,
+ const Ice::Current&);
virtual void opMyClass_async(const Test::AMD_MyClass_opMyClassPtr&,
- const Test::MyClassPrx&,
- const Ice::Current&);
+ const Test::MyClassPrx&,
+ const Ice::Current&);
virtual void opStruct_async(const Test::AMD_MyClass_opStructPtr&,
- const Test::Structure&, const Test::Structure&,
- const Ice::Current&);
+ const Test::Structure&, const Test::Structure&,
+ const Ice::Current&);
virtual void opByteS_async(const Test::AMD_MyClass_opByteSPtr&,
- const Test::ByteS&, const Test::ByteS&,
- const Ice::Current&);
+ const Test::ByteS&, const Test::ByteS&,
+ const Ice::Current&);
virtual void opBoolS_async(const Test::AMD_MyClass_opBoolSPtr&,
- const Test::BoolS&, const Test::BoolS&,
- const Ice::Current&);
+ const Test::BoolS&, const Test::BoolS&,
+ const Ice::Current&);
virtual void opShortIntLongS_async(const Test::AMD_MyClass_opShortIntLongSPtr&,
- const Test::ShortS&, const Test::IntS&, const Test::LongS&,
- const Ice::Current&);
+ const Test::ShortS&, const Test::IntS&, const Test::LongS&,
+ const Ice::Current&);
virtual void opFloatDoubleS_async(const Test::AMD_MyClass_opFloatDoubleSPtr&,
- const Test::FloatS&, const Test::DoubleS&,
- const Ice::Current&);
+ const Test::FloatS&, const Test::DoubleS&,
+ const Ice::Current&);
virtual void opStringS_async(const Test::AMD_MyClass_opStringSPtr&,
- const Test::StringS&, const Test::StringS&,
- const Ice::Current&);
+ const Test::StringS&, const Test::StringS&,
+ const Ice::Current&);
virtual void opByteSS_async(const Test::AMD_MyClass_opByteSSPtr&,
- const Test::ByteSS&, const Test::ByteSS&,
- const Ice::Current&);
+ const Test::ByteSS&, const Test::ByteSS&,
+ const Ice::Current&);
virtual void opBoolSS_async(const Test::AMD_MyClass_opBoolSSPtr&,
- const Test::BoolSS&, const Test::BoolSS&,
- const Ice::Current&);
+ const Test::BoolSS&, const Test::BoolSS&,
+ const Ice::Current&);
virtual void opShortIntLongSS_async(const Test::AMD_MyClass_opShortIntLongSSPtr&,
- const Test::ShortSS&, const Test::IntSS&, const Test::LongSS&,
- const Ice::Current&);
+ const Test::ShortSS&, const Test::IntSS&, const Test::LongSS&,
+ const Ice::Current&);
virtual void opFloatDoubleSS_async(const Test::AMD_MyClass_opFloatDoubleSSPtr&,
- const Test::FloatSS&, const Test::DoubleSS&,
- const Ice::Current&);
+ const Test::FloatSS&, const Test::DoubleSS&,
+ const Ice::Current&);
virtual void opStringSS_async(const Test::AMD_MyClass_opStringSSPtr&,
- const Test::StringSS&, const Test::StringSS&,
- const Ice::Current&);
+ const Test::StringSS&, const Test::StringSS&,
+ const Ice::Current&);
virtual void opStringSSS_async(const Test::AMD_MyClass_opStringSSSPtr&,
- const Test::StringSSS&, const Test::StringSSS&,
- const Ice::Current&);
+ const Test::StringSSS&, const Test::StringSSS&,
+ const Ice::Current&);
virtual void opByteBoolD_async(const Test::AMD_MyClass_opByteBoolDPtr&,
- const Test::ByteBoolD&, const Test::ByteBoolD&,
- const Ice::Current&);
+ const Test::ByteBoolD&, const Test::ByteBoolD&,
+ const Ice::Current&);
virtual void opShortIntD_async(const Test::AMD_MyClass_opShortIntDPtr&,
- const Test::ShortIntD&, const Test::ShortIntD&,
- const Ice::Current&);
+ const Test::ShortIntD&, const Test::ShortIntD&,
+ const Ice::Current&);
virtual void opLongFloatD_async(const Test::AMD_MyClass_opLongFloatDPtr&,
- const Test::LongFloatD&, const Test::LongFloatD&,
- const Ice::Current&);
+ const Test::LongFloatD&, const Test::LongFloatD&,
+ const Ice::Current&);
virtual void opStringStringD_async(const Test::AMD_MyClass_opStringStringDPtr&,
- const Test::StringStringD&, const Test::StringStringD&,
- const Ice::Current&);
+ const Test::StringStringD&, const Test::StringStringD&,
+ const Ice::Current&);
virtual void opStringMyEnumD_async(const Test::AMD_MyClass_opStringMyEnumDPtr&,
- const Test::StringMyEnumD&, const Test::StringMyEnumD&,
- const Ice::Current&);
+ const Test::StringMyEnumD&, const Test::StringMyEnumD&,
+ const Ice::Current&);
virtual void opIntS_async(const Test::AMD_MyClass_opIntSPtr&, const Test::IntS&, const Ice::Current&);
virtual void opByteSOneway_async(const Test::AMD_MyClass_opByteSOnewayPtr&, const Test::ByteS&,
- const Ice::Current&);
+ const Ice::Current&);
virtual void opContext_async(const Test::AMD_MyClass_opContextPtr&, const Ice::Current&);
virtual void opDoubleMarshaling_async(const Test::AMD_MyClass_opDoubleMarshalingPtr&,
- Ice::Double, const Test::DoubleS&, const Ice::Current&);
+ Ice::Double, const Test::DoubleS&, const Ice::Current&);
virtual void opDerived_async(const Test::AMD_MyDerivedClass_opDerivedPtr&,
- const Ice::Current&);
+ const Ice::Current&);
private:
diff --git a/cpp/test/Ice/operations/TestI.cpp b/cpp/test/Ice/operations/TestI.cpp
index 77b275b5ae7..e6415f93a87 100644
--- a/cpp/test/Ice/operations/TestI.cpp
+++ b/cpp/test/Ice/operations/TestI.cpp
@@ -41,9 +41,9 @@ MyDerivedClassI::opSleep(int duration, const Ice::Current&)
Ice::Byte
MyDerivedClassI::opByte(Ice::Byte p1,
- Ice::Byte p2,
- Ice::Byte& p3,
- const Ice::Current&)
+ Ice::Byte p2,
+ Ice::Byte& p3,
+ const Ice::Current&)
{
p3 = p1 ^ p2;
return p1;
@@ -51,9 +51,9 @@ MyDerivedClassI::opByte(Ice::Byte p1,
bool
MyDerivedClassI::opBool(bool p1,
- bool p2,
- bool& p3,
- const Ice::Current&)
+ bool p2,
+ bool& p3,
+ const Ice::Current&)
{
p3 = p1;
return p2;
@@ -61,12 +61,12 @@ MyDerivedClassI::opBool(bool p1,
Ice::Long
MyDerivedClassI::opShortIntLong(Ice::Short p1,
- Ice::Int p2,
- Ice::Long p3,
- Ice::Short& p4,
- Ice::Int& p5,
- Ice::Long& p6,
- const Ice::Current&)
+ Ice::Int p2,
+ Ice::Long p3,
+ Ice::Short& p4,
+ Ice::Int& p5,
+ Ice::Long& p6,
+ const Ice::Current&)
{
p4 = p1;
p5 = p2;
@@ -76,10 +76,10 @@ MyDerivedClassI::opShortIntLong(Ice::Short p1,
Ice::Double
MyDerivedClassI::opFloatDouble(Ice::Float p1,
- Ice::Double p2,
- Ice::Float& p3,
- Ice::Double& p4,
- const Ice::Current&)
+ Ice::Double p2,
+ Ice::Float& p3,
+ Ice::Double& p4,
+ const Ice::Current&)
{
p3 = p1;
p4 = p2;
@@ -88,9 +88,9 @@ MyDerivedClassI::opFloatDouble(Ice::Float p1,
std::string
MyDerivedClassI::opString(const std::string& p1,
- const std::string& p2,
- std::string& p3,
- const Ice::Current&)
+ const std::string& p2,
+ std::string& p3,
+ const Ice::Current&)
{
p3 = p2 + " " + p1;
return p1 + " " + p2;
@@ -98,8 +98,8 @@ MyDerivedClassI::opString(const std::string& p1,
Test::MyEnum
MyDerivedClassI::opMyEnum(Test::MyEnum p1,
- Test::MyEnum& p2,
- const Ice::Current&)
+ Test::MyEnum& p2,
+ const Ice::Current&)
{
p2 = p1;
return Test::enum3;
@@ -107,21 +107,21 @@ MyDerivedClassI::opMyEnum(Test::MyEnum p1,
Test::MyClassPrx
MyDerivedClassI::opMyClass(const Test::MyClassPrx& p1,
- Test::MyClassPrx& p2,
- Test::MyClassPrx& p3,
- const Ice::Current&)
+ Test::MyClassPrx& p2,
+ Test::MyClassPrx& p3,
+ const Ice::Current&)
{
p2 = p1;
p3 = Test::MyClassPrx::uncheckedCast(_adapter->createProxy(
- _adapter->getCommunicator()->stringToIdentity("noSuchIdentity")));
+ _adapter->getCommunicator()->stringToIdentity("noSuchIdentity")));
return Test::MyClassPrx::uncheckedCast(_adapter->createProxy(_identity));
}
Test::Structure
MyDerivedClassI::opStruct(const Test::Structure& p1,
- const ::Test::Structure& p2,
- ::Test::Structure& p3,
- const Ice::Current&)
+ const ::Test::Structure& p2,
+ ::Test::Structure& p3,
+ const Ice::Current&)
{
p3 = p1;
p3.s.s = "a new string";
@@ -130,9 +130,9 @@ MyDerivedClassI::opStruct(const Test::Structure& p1,
Test::ByteS
MyDerivedClassI::opByteS(const Test::ByteS& p1,
- const Test::ByteS& p2,
- Test::ByteS& p3,
- const Ice::Current&)
+ const Test::ByteS& p2,
+ Test::ByteS& p3,
+ const Ice::Current&)
{
p3.resize(p1.size());
std::reverse_copy(p1.begin(), p1.end(), p3.begin());
@@ -143,9 +143,9 @@ MyDerivedClassI::opByteS(const Test::ByteS& p1,
Test::BoolS
MyDerivedClassI::opBoolS(const Test::BoolS& p1,
- const Test::BoolS& p2,
- Test::BoolS& p3,
- const Ice::Current&)
+ const Test::BoolS& p2,
+ Test::BoolS& p3,
+ const Ice::Current&)
{
p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -157,12 +157,12 @@ MyDerivedClassI::opBoolS(const Test::BoolS& p1,
Test::LongS
MyDerivedClassI::opShortIntLongS(const Test::ShortS& p1,
- const Test::IntS& p2,
- const Test::LongS& p3,
- Test::ShortS& p4,
- Test::IntS& p5,
- Test::LongS& p6,
- const Ice::Current&)
+ const Test::IntS& p2,
+ const Test::LongS& p3,
+ Test::ShortS& p4,
+ Test::IntS& p5,
+ Test::LongS& p6,
+ const Ice::Current&)
{
p4 = p1;
p5.resize(p2.size());
@@ -174,10 +174,10 @@ MyDerivedClassI::opShortIntLongS(const Test::ShortS& p1,
Test::DoubleS
MyDerivedClassI::opFloatDoubleS(const Test::FloatS& p1,
- const Test::DoubleS& p2,
- Test::FloatS& p3,
- Test::DoubleS& p4,
- const Ice::Current&)
+ const Test::DoubleS& p2,
+ Test::FloatS& p3,
+ Test::DoubleS& p4,
+ const Ice::Current&)
{
p3 = p1;
p4.resize(p2.size());
@@ -189,9 +189,9 @@ MyDerivedClassI::opFloatDoubleS(const Test::FloatS& p1,
Test::StringS
MyDerivedClassI::opStringS(const Test::StringS& p1,
- const Test::StringS& p2,
- Test::StringS& p3,
- const Ice::Current&)
+ const Test::StringS& p2,
+ Test::StringS& p3,
+ const Ice::Current&)
{
p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -203,9 +203,9 @@ MyDerivedClassI::opStringS(const Test::StringS& p1,
Test::ByteSS
MyDerivedClassI::opByteSS(const Test::ByteSS& p1,
- const Test::ByteSS& p2,
- Test::ByteSS& p3,
- const Ice::Current&)
+ const Test::ByteSS& p2,
+ Test::ByteSS& p3,
+ const Ice::Current&)
{
p3.resize(p1.size());
std::reverse_copy(p1.begin(), p1.end(), p3.begin());
@@ -216,9 +216,9 @@ MyDerivedClassI::opByteSS(const Test::ByteSS& p1,
Test::BoolSS
MyDerivedClassI::opBoolSS(const Test::BoolSS& p1,
- const Test::BoolSS& p2,
- Test::BoolSS& p3,
- const Ice::Current&)
+ const Test::BoolSS& p2,
+ Test::BoolSS& p3,
+ const Ice::Current&)
{
p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -230,12 +230,12 @@ MyDerivedClassI::opBoolSS(const Test::BoolSS& p1,
Test::LongSS
MyDerivedClassI::opShortIntLongSS(const Test::ShortSS& p1,
- const Test::IntSS& p2,
- const Test::LongSS& p3,
- Test::ShortSS& p4,
- Test::IntSS& p5,
- Test::LongSS& p6,
- const Ice::Current&)
+ const Test::IntSS& p2,
+ const Test::LongSS& p3,
+ Test::ShortSS& p4,
+ Test::IntSS& p5,
+ Test::LongSS& p6,
+ const Ice::Current&)
{
p4 = p1;
p5.resize(p2.size());
@@ -247,10 +247,10 @@ MyDerivedClassI::opShortIntLongSS(const Test::ShortSS& p1,
Test::DoubleSS
MyDerivedClassI::opFloatDoubleSS(const Test::FloatSS& p1,
- const Test::DoubleSS& p2,
- Test::FloatSS& p3,
- Test::DoubleSS& p4,
- const Ice::Current&)
+ const Test::DoubleSS& p2,
+ Test::FloatSS& p3,
+ Test::DoubleSS& p4,
+ const Ice::Current&)
{
p3 = p1;
p4.resize(p2.size());
@@ -262,9 +262,9 @@ MyDerivedClassI::opFloatDoubleSS(const Test::FloatSS& p1,
Test::StringSS
MyDerivedClassI::opStringSS(const Test::StringSS& p1,
- const Test::StringSS& p2,
- Test::StringSS& p3,
- const Ice::Current&)
+ const Test::StringSS& p2,
+ Test::StringSS& p3,
+ const Ice::Current&)
{
p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -276,9 +276,9 @@ MyDerivedClassI::opStringSS(const Test::StringSS& p1,
Test::StringSSS
MyDerivedClassI::opStringSSS(const Test::StringSSS& p1,
- const Test::StringSSS& p2,
- Test::StringSSS& p3,
- const ::Ice::Current&)
+ const Test::StringSSS& p2,
+ Test::StringSSS& p3,
+ const ::Ice::Current&)
{
p3 = p1;
std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
@@ -290,9 +290,9 @@ MyDerivedClassI::opStringSSS(const Test::StringSSS& p1,
Test::ByteBoolD
MyDerivedClassI::opByteBoolD(const Test::ByteBoolD& p1,
- const Test::ByteBoolD& p2,
- Test::ByteBoolD& p3,
- const Ice::Current&)
+ const Test::ByteBoolD& p2,
+ Test::ByteBoolD& p3,
+ const Ice::Current&)
{
p3 = p1;
Test::ByteBoolD r = p1;
@@ -302,9 +302,9 @@ MyDerivedClassI::opByteBoolD(const Test::ByteBoolD& p1,
Test::ShortIntD
MyDerivedClassI::opShortIntD(const Test::ShortIntD& p1,
- const Test::ShortIntD& p2,
- Test::ShortIntD& p3,
- const Ice::Current&)
+ const Test::ShortIntD& p2,
+ Test::ShortIntD& p3,
+ const Ice::Current&)
{
p3 = p1;
Test::ShortIntD r = p1;
@@ -314,9 +314,9 @@ MyDerivedClassI::opShortIntD(const Test::ShortIntD& p1,
Test::LongFloatD
MyDerivedClassI::opLongFloatD(const Test::LongFloatD& p1,
- const Test::LongFloatD& p2,
- Test::LongFloatD& p3,
- const Ice::Current&)
+ const Test::LongFloatD& p2,
+ Test::LongFloatD& p3,
+ const Ice::Current&)
{
p3 = p1;
Test::LongFloatD r = p1;
@@ -326,9 +326,9 @@ MyDerivedClassI::opLongFloatD(const Test::LongFloatD& p1,
Test::StringStringD
MyDerivedClassI::opStringStringD(const Test::StringStringD& p1,
- const Test::StringStringD& p2,
- Test::StringStringD& p3,
- const Ice::Current&)
+ const Test::StringStringD& p2,
+ Test::StringStringD& p3,
+ const Ice::Current&)
{
p3 = p1;
Test::StringStringD r = p1;
@@ -338,9 +338,9 @@ MyDerivedClassI::opStringStringD(const Test::StringStringD& p1,
Test::StringMyEnumD
MyDerivedClassI::opStringMyEnumD(const Test::StringMyEnumD& p1,
- const Test::StringMyEnumD& p2,
- Test::StringMyEnumD& p3,
- const Ice::Current&)
+ const Test::StringMyEnumD& p2,
+ Test::StringMyEnumD& p3,
+ const Ice::Current&)
{
p3 = p1;
Test::StringMyEnumD r = p1;
diff --git a/cpp/test/Ice/operations/TestI.h b/cpp/test/Ice/operations/TestI.h
index 5a396df41e9..d5f8be15477 100644
--- a/cpp/test/Ice/operations/TestI.h
+++ b/cpp/test/Ice/operations/TestI.h
@@ -25,128 +25,128 @@ public:
virtual void opSleep(int, const Ice::Current&);
virtual Ice::Byte opByte(Ice::Byte,
- Ice::Byte,
- Ice::Byte&,
- const Ice::Current&);
+ Ice::Byte,
+ Ice::Byte&,
+ const Ice::Current&);
virtual bool opBool(bool,
- bool,
- bool&,
- const Ice::Current&);
+ bool,
+ bool&,
+ const Ice::Current&);
virtual Ice::Long opShortIntLong(Ice::Short,
- Ice::Int,
- Ice::Long,
- Ice::Short&,
- Ice::Int&,
- Ice::Long&,
- const Ice::Current&);
+ Ice::Int,
+ Ice::Long,
+ Ice::Short&,
+ Ice::Int&,
+ Ice::Long&,
+ const Ice::Current&);
virtual Ice::Double opFloatDouble(Ice::Float,
- Ice::Double,
- Ice::Float&,
- Ice::Double&,
- const Ice::Current&);
+ Ice::Double,
+ Ice::Float&,
+ Ice::Double&,
+ const Ice::Current&);
virtual std::string opString(const std::string&,
- const std::string&,
- std::string&,
- const Ice::Current&);
+ const std::string&,
+ std::string&,
+ const Ice::Current&);
virtual Test::MyEnum opMyEnum(Test::MyEnum,
- Test::MyEnum&,
- const Ice::Current&);
+ Test::MyEnum&,
+ const Ice::Current&);
virtual Test::MyClassPrx opMyClass(const Test::MyClassPrx&,
- Test::MyClassPrx&, Test::MyClassPrx&,
- const Ice::Current&);
+ Test::MyClassPrx&, Test::MyClassPrx&,
+ const Ice::Current&);
virtual Test::Structure opStruct(const Test::Structure&, const Test::Structure&,
- Test::Structure&,
- const Ice::Current&);
+ Test::Structure&,
+ const Ice::Current&);
virtual Test::ByteS opByteS(const Test::ByteS&,
- const Test::ByteS&,
- Test::ByteS&,
- const Ice::Current&);
+ const Test::ByteS&,
+ Test::ByteS&,
+ const Ice::Current&);
virtual Test::BoolS opBoolS(const Test::BoolS&,
- const Test::BoolS&,
- Test::BoolS&,
- const Ice::Current&);
+ const Test::BoolS&,
+ Test::BoolS&,
+ const Ice::Current&);
virtual Test::LongS opShortIntLongS(const Test::ShortS&,
- const Test::IntS&,
- const Test::LongS&,
- Test::ShortS&,
- Test::IntS&,
- Test::LongS&,
- const Ice::Current&);
+ const Test::IntS&,
+ const Test::LongS&,
+ Test::ShortS&,
+ Test::IntS&,
+ Test::LongS&,
+ const Ice::Current&);
virtual Test::DoubleS opFloatDoubleS(const Test::FloatS&,
- const Test::DoubleS&,
- Test::FloatS&,
- Test::DoubleS&,
- const Ice::Current&);
+ const Test::DoubleS&,
+ Test::FloatS&,
+ Test::DoubleS&,
+ const Ice::Current&);
virtual Test::StringS opStringS(const Test::StringS&,
- const Test::StringS&,
- Test::StringS&,
- const Ice::Current&);
+ const Test::StringS&,
+ Test::StringS&,
+ const Ice::Current&);
virtual Test::ByteSS opByteSS(const Test::ByteSS&,
- const Test::ByteSS&,
- Test::ByteSS&,
- const Ice::Current&);
+ const Test::ByteSS&,
+ Test::ByteSS&,
+ const Ice::Current&);
virtual Test::BoolSS opBoolSS(const Test::BoolSS&,
- const Test::BoolSS&,
- Test::BoolSS&,
- const Ice::Current&);
+ const Test::BoolSS&,
+ Test::BoolSS&,
+ const Ice::Current&);
virtual Test::LongSS opShortIntLongSS(const Test::ShortSS&,
- const Test::IntSS&,
- const Test::LongSS&,
- Test::ShortSS&,
- Test::IntSS&,
- Test::LongSS&,
- const Ice::Current&);
+ const Test::IntSS&,
+ const Test::LongSS&,
+ Test::ShortSS&,
+ Test::IntSS&,
+ Test::LongSS&,
+ const Ice::Current&);
virtual Test::DoubleSS opFloatDoubleSS(const Test::FloatSS&,
- const Test::DoubleSS&,
- Test::FloatSS&,
- Test::DoubleSS&,
- const Ice::Current&);
+ const Test::DoubleSS&,
+ Test::FloatSS&,
+ Test::DoubleSS&,
+ const Ice::Current&);
virtual Test::StringSS opStringSS(const Test::StringSS&,
- const Test::StringSS&,
- Test::StringSS&,
- const Ice::Current&);
+ const Test::StringSS&,
+ Test::StringSS&,
+ const Ice::Current&);
virtual Test::StringSSS opStringSSS(const Test::StringSSS&,
- const Test::StringSSS&,
- Test::StringSSS&,
- const ::Ice::Current&);
+ const Test::StringSSS&,
+ Test::StringSSS&,
+ const ::Ice::Current&);
virtual Test::ByteBoolD opByteBoolD(const Test::ByteBoolD&, const Test::ByteBoolD&,
- Test::ByteBoolD&,
- const Ice::Current&);
+ Test::ByteBoolD&,
+ const Ice::Current&);
virtual Test::ShortIntD opShortIntD(const Test::ShortIntD&, const Test::ShortIntD&,
- Test::ShortIntD&,
- const Ice::Current&);
+ Test::ShortIntD&,
+ const Ice::Current&);
virtual Test::LongFloatD opLongFloatD(const Test::LongFloatD&, const Test::LongFloatD&,
- Test::LongFloatD&,
- const Ice::Current&);
+ Test::LongFloatD&,
+ const Ice::Current&);
virtual Test::StringStringD opStringStringD(const Test::StringStringD&, const Test::StringStringD&,
- Test::StringStringD&,
- const Ice::Current&);
+ Test::StringStringD&,
+ const Ice::Current&);
virtual Test::StringMyEnumD opStringMyEnumD(const Test::StringMyEnumD&, const Test::StringMyEnumD&,
- Test::StringMyEnumD&,
- const Ice::Current&);
+ Test::StringMyEnumD&,
+ const Ice::Current&);
virtual Test::IntS opIntS(const Test::IntS&, const Ice::Current&);
diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp
index 107e198a5d6..27f7133b622 100644
--- a/cpp/test/Ice/operations/Twoways.cpp
+++ b/cpp/test/Ice/operations/Twoways.cpp
@@ -28,723 +28,723 @@ void
twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
{
{
- p->opVoid();
+ p->opVoid();
}
{
- Ice::Byte b;
- Ice::Byte r;
+ Ice::Byte b;
+ Ice::Byte r;
- r = p->opByte(Ice::Byte(0xff), Ice::Byte(0x0f), b);
- test(b == Ice::Byte(0xf0));
- test(r == Ice::Byte(0xff));
+ r = p->opByte(Ice::Byte(0xff), Ice::Byte(0x0f), b);
+ test(b == Ice::Byte(0xf0));
+ test(r == Ice::Byte(0xff));
}
{
- bool b;
- bool r;
+ bool b;
+ bool r;
- r = p->opBool(true, false, b);
- test(b);
- test(!r);
+ r = p->opBool(true, false, b);
+ test(b);
+ test(!r);
}
{
- Ice::Short s;
- Ice::Int i;
- Ice::Long l;
- Ice::Long r;
-
- r = p->opShortIntLong(10, 11, 12, s, i, l);
- test(s == 10);
- test(i == 11);
- test(l == 12);
- test(r == 12);
-
- r = p->opShortIntLong(numeric_limits<Ice::Short>::min(), numeric_limits<Ice::Int>::min(),
- numeric_limits<Ice::Long>::min(), s, i, l);
- test(s == numeric_limits<Ice::Short>::min());
- test(i == numeric_limits<Ice::Int>::min());
- test(l == numeric_limits<Ice::Long>::min());
- test(r == numeric_limits<Ice::Long>::min());
-
- r = p->opShortIntLong(numeric_limits<Ice::Short>::max(), numeric_limits<Ice::Int>::max(),
- numeric_limits<Ice::Long>::max(), s, i, l);
- test(s == numeric_limits<Ice::Short>::max());
- test(i == numeric_limits<Ice::Int>::max());
- test(l == numeric_limits<Ice::Long>::max());
- test(r == numeric_limits<Ice::Long>::max());
+ Ice::Short s;
+ Ice::Int i;
+ Ice::Long l;
+ Ice::Long r;
+
+ r = p->opShortIntLong(10, 11, 12, s, i, l);
+ test(s == 10);
+ test(i == 11);
+ test(l == 12);
+ test(r == 12);
+
+ r = p->opShortIntLong(numeric_limits<Ice::Short>::min(), numeric_limits<Ice::Int>::min(),
+ numeric_limits<Ice::Long>::min(), s, i, l);
+ test(s == numeric_limits<Ice::Short>::min());
+ test(i == numeric_limits<Ice::Int>::min());
+ test(l == numeric_limits<Ice::Long>::min());
+ test(r == numeric_limits<Ice::Long>::min());
+
+ r = p->opShortIntLong(numeric_limits<Ice::Short>::max(), numeric_limits<Ice::Int>::max(),
+ numeric_limits<Ice::Long>::max(), s, i, l);
+ test(s == numeric_limits<Ice::Short>::max());
+ test(i == numeric_limits<Ice::Int>::max());
+ test(l == numeric_limits<Ice::Long>::max());
+ test(r == numeric_limits<Ice::Long>::max());
}
{
- Ice::Float f;
- Ice::Double d;
- Ice::Double r;
-
- r = p->opFloatDouble(Ice::Float(3.14), Ice::Double(1.1E10), f, d);
- test(f == Ice::Float(3.14));
- test(d == Ice::Double(1.1E10));
- test(r == Ice::Double(1.1E10));
-
- r = p->opFloatDouble(numeric_limits<Ice::Float>::min(), numeric_limits<Ice::Double>::min(), f, d);
- test(f == numeric_limits<Ice::Float>::min());
- test(d == numeric_limits<Ice::Double>::min());
- test(r == numeric_limits<Ice::Double>::min());
-
- r = p->opFloatDouble(numeric_limits<Ice::Float>::max(), numeric_limits<Ice::Double>::max(), f, d);
- test(f == numeric_limits<Ice::Float>::max());
- test(d == numeric_limits<Ice::Double>::max());
- test(r == numeric_limits<Ice::Double>::max());
+ Ice::Float f;
+ Ice::Double d;
+ Ice::Double r;
+
+ r = p->opFloatDouble(Ice::Float(3.14), Ice::Double(1.1E10), f, d);
+ test(f == Ice::Float(3.14));
+ test(d == Ice::Double(1.1E10));
+ test(r == Ice::Double(1.1E10));
+
+ r = p->opFloatDouble(numeric_limits<Ice::Float>::min(), numeric_limits<Ice::Double>::min(), f, d);
+ test(f == numeric_limits<Ice::Float>::min());
+ test(d == numeric_limits<Ice::Double>::min());
+ test(r == numeric_limits<Ice::Double>::min());
+
+ r = p->opFloatDouble(numeric_limits<Ice::Float>::max(), numeric_limits<Ice::Double>::max(), f, d);
+ test(f == numeric_limits<Ice::Float>::max());
+ test(d == numeric_limits<Ice::Double>::max());
+ test(r == numeric_limits<Ice::Double>::max());
}
{
- string s;
- string r;
+ string s;
+ string r;
- r = p->opString("hello", "world", s);
- test(s == "world hello");
- test(r == "hello world");
+ r = p->opString("hello", "world", s);
+ test(s == "world hello");
+ test(r == "hello world");
}
{
- Test::MyEnum e;
- Test::MyEnum r;
-
- r = p->opMyEnum(Test::enum2, e);
- test(e == Test::enum2);
- test(r == Test::enum3);
+ Test::MyEnum e;
+ Test::MyEnum r;
+
+ r = p->opMyEnum(Test::enum2, e);
+ test(e == Test::enum2);
+ test(r == Test::enum3);
}
{
- Test::MyClassPrx c1;
- Test::MyClassPrx c2;
- Test::MyClassPrx r;
-
- r = p->opMyClass(p, c1, c2);
- test(Ice::proxyIdentityAndFacetEqual(c1, p));
- test(!Ice::proxyIdentityAndFacetEqual(c2, p));
- test(Ice::proxyIdentityAndFacetEqual(r, p));
- test(c1->ice_getIdentity() == communicator->stringToIdentity("test"));
- test(c2->ice_getIdentity() == communicator->stringToIdentity("noSuchIdentity"));
- test(r->ice_getIdentity() == communicator->stringToIdentity("test"));
- r->opVoid();
- c1->opVoid();
- try
- {
- c2->opVoid();
- test(false);
- }
- catch(const Ice::ObjectNotExistException&)
- {
- }
-
- r = p->opMyClass(0, c1, c2);
- test(c1 == 0);
- test(c2 != 0);
- test(Ice::proxyIdentityAndFacetEqual(r, p));
- r->opVoid();
+ Test::MyClassPrx c1;
+ Test::MyClassPrx c2;
+ Test::MyClassPrx r;
+
+ r = p->opMyClass(p, c1, c2);
+ test(Ice::proxyIdentityAndFacetEqual(c1, p));
+ test(!Ice::proxyIdentityAndFacetEqual(c2, p));
+ test(Ice::proxyIdentityAndFacetEqual(r, p));
+ test(c1->ice_getIdentity() == communicator->stringToIdentity("test"));
+ test(c2->ice_getIdentity() == communicator->stringToIdentity("noSuchIdentity"));
+ test(r->ice_getIdentity() == communicator->stringToIdentity("test"));
+ r->opVoid();
+ c1->opVoid();
+ try
+ {
+ c2->opVoid();
+ test(false);
+ }
+ catch(const Ice::ObjectNotExistException&)
+ {
+ }
+
+ r = p->opMyClass(0, c1, c2);
+ test(c1 == 0);
+ test(c2 != 0);
+ test(Ice::proxyIdentityAndFacetEqual(r, p));
+ r->opVoid();
}
{
- Test::Structure si1;
- si1.p = p;
- si1.e = Test::enum3;
- si1.s.s = "abc";
- Test::Structure si2;
- si2.p = 0;
- si2.e = Test::enum2;
- si2.s.s = "def";
-
- Test::Structure so;
- Test::Structure rso = p->opStruct(si1, si2, so);
- test(rso.p == 0);
- test(rso.e == Test::enum2);
- test(rso.s.s == "def");
- test(so.p == p);
- test(so.e == Test::enum3);
- test(so.s.s == "a new string");
- so.p->opVoid();
+ Test::Structure si1;
+ si1.p = p;
+ si1.e = Test::enum3;
+ si1.s.s = "abc";
+ Test::Structure si2;
+ si2.p = 0;
+ si2.e = Test::enum2;
+ si2.s.s = "def";
+
+ Test::Structure so;
+ Test::Structure rso = p->opStruct(si1, si2, so);
+ test(rso.p == 0);
+ test(rso.e == Test::enum2);
+ test(rso.s.s == "def");
+ test(so.p == p);
+ test(so.e == Test::enum3);
+ test(so.s.s == "a new string");
+ so.p->opVoid();
}
{
- Test::ByteS bsi1;
- Test::ByteS bsi2;
-
- bsi1.push_back(Ice::Byte(0x01));
- bsi1.push_back(Ice::Byte(0x11));
- bsi1.push_back(Ice::Byte(0x12));
- bsi1.push_back(Ice::Byte(0x22));
-
- bsi2.push_back(Ice::Byte(0xf1));
- bsi2.push_back(Ice::Byte(0xf2));
- bsi2.push_back(Ice::Byte(0xf3));
- bsi2.push_back(Ice::Byte(0xf4));
-
- Test::ByteS bso;
- Test::ByteS rso;
-
- rso = p->opByteS(bsi1, bsi2, bso);
- test(bso.size() == 4);
- test(bso[0] == Ice::Byte(0x22));
- test(bso[1] == Ice::Byte(0x12));
- test(bso[2] == Ice::Byte(0x11));
- test(bso[3] == Ice::Byte(0x01));
- test(rso.size() == 8);
- test(rso[0] == Ice::Byte(0x01));
- test(rso[1] == Ice::Byte(0x11));
- test(rso[2] == Ice::Byte(0x12));
- test(rso[3] == Ice::Byte(0x22));
- test(rso[4] == Ice::Byte(0xf1));
- test(rso[5] == Ice::Byte(0xf2));
- test(rso[6] == Ice::Byte(0xf3));
- test(rso[7] == Ice::Byte(0xf4));
+ Test::ByteS bsi1;
+ Test::ByteS bsi2;
+
+ bsi1.push_back(Ice::Byte(0x01));
+ bsi1.push_back(Ice::Byte(0x11));
+ bsi1.push_back(Ice::Byte(0x12));
+ bsi1.push_back(Ice::Byte(0x22));
+
+ bsi2.push_back(Ice::Byte(0xf1));
+ bsi2.push_back(Ice::Byte(0xf2));
+ bsi2.push_back(Ice::Byte(0xf3));
+ bsi2.push_back(Ice::Byte(0xf4));
+
+ Test::ByteS bso;
+ Test::ByteS rso;
+
+ rso = p->opByteS(bsi1, bsi2, bso);
+ test(bso.size() == 4);
+ test(bso[0] == Ice::Byte(0x22));
+ test(bso[1] == Ice::Byte(0x12));
+ test(bso[2] == Ice::Byte(0x11));
+ test(bso[3] == Ice::Byte(0x01));
+ test(rso.size() == 8);
+ test(rso[0] == Ice::Byte(0x01));
+ test(rso[1] == Ice::Byte(0x11));
+ test(rso[2] == Ice::Byte(0x12));
+ test(rso[3] == Ice::Byte(0x22));
+ test(rso[4] == Ice::Byte(0xf1));
+ test(rso[5] == Ice::Byte(0xf2));
+ test(rso[6] == Ice::Byte(0xf3));
+ test(rso[7] == Ice::Byte(0xf4));
}
{
- Test::BoolS bsi1;
- Test::BoolS bsi2;
-
- bsi1.push_back(true);
- bsi1.push_back(true);
- bsi1.push_back(false);
-
- bsi2.push_back(false);
-
- Test::BoolS bso;
- Test::BoolS rso;
-
- rso = p->opBoolS(bsi1, bsi2, bso);
- test(bso.size() == 4);
- test(bso[0]);
- test(bso[1]);
- test(!bso[2]);
- test(!bso[3]);
- test(rso.size() == 3);
- test(!rso[0]);
- test(rso[1]);
- test(rso[2]);
+ Test::BoolS bsi1;
+ Test::BoolS bsi2;
+
+ bsi1.push_back(true);
+ bsi1.push_back(true);
+ bsi1.push_back(false);
+
+ bsi2.push_back(false);
+
+ Test::BoolS bso;
+ Test::BoolS rso;
+
+ rso = p->opBoolS(bsi1, bsi2, bso);
+ test(bso.size() == 4);
+ test(bso[0]);
+ test(bso[1]);
+ test(!bso[2]);
+ test(!bso[3]);
+ test(rso.size() == 3);
+ test(!rso[0]);
+ test(rso[1]);
+ test(rso[2]);
}
{
- Test::ShortS ssi;
- Test::IntS isi;
- Test::LongS lsi;
-
- ssi.push_back(1);
- ssi.push_back(2);
- ssi.push_back(3);
-
- isi.push_back(5);
- isi.push_back(6);
- isi.push_back(7);
- isi.push_back(8);
-
- lsi.push_back(10);
- lsi.push_back(30);
- lsi.push_back(20);
-
- Test::ShortS sso;
- Test::IntS iso;
- Test::LongS lso;
- Test::LongS rso;
-
- rso = p->opShortIntLongS(ssi, isi, lsi, sso, iso, lso);
- test(sso.size() == 3);
- test(sso[0] == 1);
- test(sso[1] == 2);
- test(sso[2] == 3);
- test(iso.size() == 4);
- test(iso[0] == 8);
- test(iso[1] == 7);
- test(iso[2] == 6);
- test(iso[3] == 5);
- test(lso.size() == 6);
- test(lso[0] == 10);
- test(lso[1] == 30);
- test(lso[2] == 20);
- test(lso[3] == 10);
- test(lso[4] == 30);
- test(lso[5] == 20);
- test(rso.size() == 3);
- test(rso[0] == 10);
- test(rso[1] == 30);
- test(rso[2] == 20);
+ Test::ShortS ssi;
+ Test::IntS isi;
+ Test::LongS lsi;
+
+ ssi.push_back(1);
+ ssi.push_back(2);
+ ssi.push_back(3);
+
+ isi.push_back(5);
+ isi.push_back(6);
+ isi.push_back(7);
+ isi.push_back(8);
+
+ lsi.push_back(10);
+ lsi.push_back(30);
+ lsi.push_back(20);
+
+ Test::ShortS sso;
+ Test::IntS iso;
+ Test::LongS lso;
+ Test::LongS rso;
+
+ rso = p->opShortIntLongS(ssi, isi, lsi, sso, iso, lso);
+ test(sso.size() == 3);
+ test(sso[0] == 1);
+ test(sso[1] == 2);
+ test(sso[2] == 3);
+ test(iso.size() == 4);
+ test(iso[0] == 8);
+ test(iso[1] == 7);
+ test(iso[2] == 6);
+ test(iso[3] == 5);
+ test(lso.size() == 6);
+ test(lso[0] == 10);
+ test(lso[1] == 30);
+ test(lso[2] == 20);
+ test(lso[3] == 10);
+ test(lso[4] == 30);
+ test(lso[5] == 20);
+ test(rso.size() == 3);
+ test(rso[0] == 10);
+ test(rso[1] == 30);
+ test(rso[2] == 20);
}
{
- Test::FloatS fsi;
- Test::DoubleS dsi;
-
- fsi.push_back(Ice::Float(3.14));
- fsi.push_back(Ice::Float(1.11));
-
- dsi.push_back(Ice::Double(1.1E10));
- dsi.push_back(Ice::Double(1.2E10));
- dsi.push_back(Ice::Double(1.3E10));
-
- Test::FloatS fso;
- Test::DoubleS dso;
- Test::DoubleS rso;
-
- rso = p->opFloatDoubleS(fsi, dsi, fso, dso);
- test(fso.size() == 2);
- test(fso[0] == ::Ice::Float(3.14));
- test(fso[1] == ::Ice::Float(1.11));
- test(dso.size() == 3);
- test(dso[0] == ::Ice::Double(1.3E10));
- test(dso[1] == ::Ice::Double(1.2E10));
- test(dso[2] == ::Ice::Double(1.1E10));
- test(rso.size() == 5);
- test(rso[0] == ::Ice::Double(1.1E10));
- test(rso[1] == ::Ice::Double(1.2E10));
- test(rso[2] == ::Ice::Double(1.3E10));
- test(::Ice::Float(rso[3]) == ::Ice::Float(3.14));
- test(::Ice::Float(rso[4]) == ::Ice::Float(1.11));
+ Test::FloatS fsi;
+ Test::DoubleS dsi;
+
+ fsi.push_back(Ice::Float(3.14));
+ fsi.push_back(Ice::Float(1.11));
+
+ dsi.push_back(Ice::Double(1.1E10));
+ dsi.push_back(Ice::Double(1.2E10));
+ dsi.push_back(Ice::Double(1.3E10));
+
+ Test::FloatS fso;
+ Test::DoubleS dso;
+ Test::DoubleS rso;
+
+ rso = p->opFloatDoubleS(fsi, dsi, fso, dso);
+ test(fso.size() == 2);
+ test(fso[0] == ::Ice::Float(3.14));
+ test(fso[1] == ::Ice::Float(1.11));
+ test(dso.size() == 3);
+ test(dso[0] == ::Ice::Double(1.3E10));
+ test(dso[1] == ::Ice::Double(1.2E10));
+ test(dso[2] == ::Ice::Double(1.1E10));
+ test(rso.size() == 5);
+ test(rso[0] == ::Ice::Double(1.1E10));
+ test(rso[1] == ::Ice::Double(1.2E10));
+ test(rso[2] == ::Ice::Double(1.3E10));
+ test(::Ice::Float(rso[3]) == ::Ice::Float(3.14));
+ test(::Ice::Float(rso[4]) == ::Ice::Float(1.11));
}
{
- Test::StringS ssi1;
- Test::StringS ssi2;
-
- ssi1.push_back("abc");
- ssi1.push_back("de");
- ssi1.push_back("fghi");
-
- ssi2.push_back("xyz");
-
- Test::StringS sso;
- Test::StringS rso;
-
- rso = p->opStringS(ssi1, ssi2, sso);
- test(sso.size() == 4);
- test(sso[0] == "abc");
- test(sso[1] == "de");
- test(sso[2] == "fghi");
- test(sso[3] == "xyz");
- test(rso.size() == 3);
- test(rso[0] == "fghi");
- test(rso[1] == "de");
- test(rso[2] == "abc");
+ Test::StringS ssi1;
+ Test::StringS ssi2;
+
+ ssi1.push_back("abc");
+ ssi1.push_back("de");
+ ssi1.push_back("fghi");
+
+ ssi2.push_back("xyz");
+
+ Test::StringS sso;
+ Test::StringS rso;
+
+ rso = p->opStringS(ssi1, ssi2, sso);
+ test(sso.size() == 4);
+ test(sso[0] == "abc");
+ test(sso[1] == "de");
+ test(sso[2] == "fghi");
+ test(sso[3] == "xyz");
+ test(rso.size() == 3);
+ test(rso[0] == "fghi");
+ test(rso[1] == "de");
+ test(rso[2] == "abc");
}
{
- Test::ByteSS bsi1;
- bsi1.resize(2);
- Test::ByteSS bsi2;
- bsi2.resize(2);
-
- bsi1[0].push_back(Ice::Byte(0x01));
- bsi1[0].push_back(Ice::Byte(0x11));
- bsi1[0].push_back(Ice::Byte(0x12));
- bsi1[1].push_back(Ice::Byte(0xff));
-
- bsi2[0].push_back(Ice::Byte(0x0e));
- bsi2[1].push_back(Ice::Byte(0xf2));
- bsi2[1].push_back(Ice::Byte(0xf1));
-
- Test::ByteSS bso;
- Test::ByteSS rso;
-
- rso = p->opByteSS(bsi1, bsi2, bso);
- test(bso.size() == 2);
- test(bso[0].size() == 1);
- test(bso[0][0] == Ice::Byte(0xff));
- test(bso[1].size() == 3);
- test(bso[1][0] == Ice::Byte(0x01));
- test(bso[1][1] == Ice::Byte(0x11));
- test(bso[1][2] == Ice::Byte(0x12));
- test(rso.size() == 4);
- test(rso[0].size() == 3);
- test(rso[0][0] == Ice::Byte(0x01));
- test(rso[0][1] == Ice::Byte(0x11));
- test(rso[0][2] == Ice::Byte(0x12));
- test(rso[1].size() == 1);
- test(rso[1][0] == Ice::Byte(0xff));
- test(rso[2].size() == 1);
- test(rso[2][0] == Ice::Byte(0x0e));
- test(rso[3].size() == 2);
- test(rso[3][0] == Ice::Byte(0xf2));
- test(rso[3][1] == Ice::Byte(0xf1));
+ Test::ByteSS bsi1;
+ bsi1.resize(2);
+ Test::ByteSS bsi2;
+ bsi2.resize(2);
+
+ bsi1[0].push_back(Ice::Byte(0x01));
+ bsi1[0].push_back(Ice::Byte(0x11));
+ bsi1[0].push_back(Ice::Byte(0x12));
+ bsi1[1].push_back(Ice::Byte(0xff));
+
+ bsi2[0].push_back(Ice::Byte(0x0e));
+ bsi2[1].push_back(Ice::Byte(0xf2));
+ bsi2[1].push_back(Ice::Byte(0xf1));
+
+ Test::ByteSS bso;
+ Test::ByteSS rso;
+
+ rso = p->opByteSS(bsi1, bsi2, bso);
+ test(bso.size() == 2);
+ test(bso[0].size() == 1);
+ test(bso[0][0] == Ice::Byte(0xff));
+ test(bso[1].size() == 3);
+ test(bso[1][0] == Ice::Byte(0x01));
+ test(bso[1][1] == Ice::Byte(0x11));
+ test(bso[1][2] == Ice::Byte(0x12));
+ test(rso.size() == 4);
+ test(rso[0].size() == 3);
+ test(rso[0][0] == Ice::Byte(0x01));
+ test(rso[0][1] == Ice::Byte(0x11));
+ test(rso[0][2] == Ice::Byte(0x12));
+ test(rso[1].size() == 1);
+ test(rso[1][0] == Ice::Byte(0xff));
+ test(rso[2].size() == 1);
+ test(rso[2][0] == Ice::Byte(0x0e));
+ test(rso[3].size() == 2);
+ test(rso[3][0] == Ice::Byte(0xf2));
+ test(rso[3][1] == Ice::Byte(0xf1));
}
{
- Test::FloatSS fsi;
- fsi.resize(3);
- Test::DoubleSS dsi;
- dsi.resize(1);
-
- fsi[0].push_back(Ice::Float(3.14));
- fsi[1].push_back(Ice::Float(1.11));
-
- dsi[0].push_back(Ice::Double(1.1E10));
- dsi[0].push_back(Ice::Double(1.2E10));
- dsi[0].push_back(Ice::Double(1.3E10));
-
- Test::FloatSS fso;
- Test::DoubleSS dso;
- Test::DoubleSS rso;
-
- rso = p->opFloatDoubleSS(fsi, dsi, fso, dso);
- test(fso.size() == 3);
- test(fso[0].size() == 1);
- test(fso[0][0] == ::Ice::Float(3.14));
- test(fso[1].size() == 1);
- test(fso[1][0] == ::Ice::Float(1.11));
- test(fso[2].size() == 0);
- test(dso.size() == 1);
- test(dso[0].size() == 3);
- test(dso[0][0] == ::Ice::Double(1.1E10));
- test(dso[0][1] == ::Ice::Double(1.2E10));
- test(dso[0][2] == ::Ice::Double(1.3E10));
- test(rso.size() == 2);
- test(rso[0].size() == 3);
- test(rso[0][0] == ::Ice::Double(1.1E10));
- test(rso[0][1] == ::Ice::Double(1.2E10));
- test(rso[0][2] == ::Ice::Double(1.3E10));
- test(rso[1].size() == 3);
- test(rso[1][0] == ::Ice::Double(1.1E10));
- test(rso[1][1] == ::Ice::Double(1.2E10));
- test(rso[1][2] == ::Ice::Double(1.3E10));
+ Test::FloatSS fsi;
+ fsi.resize(3);
+ Test::DoubleSS dsi;
+ dsi.resize(1);
+
+ fsi[0].push_back(Ice::Float(3.14));
+ fsi[1].push_back(Ice::Float(1.11));
+
+ dsi[0].push_back(Ice::Double(1.1E10));
+ dsi[0].push_back(Ice::Double(1.2E10));
+ dsi[0].push_back(Ice::Double(1.3E10));
+
+ Test::FloatSS fso;
+ Test::DoubleSS dso;
+ Test::DoubleSS rso;
+
+ rso = p->opFloatDoubleSS(fsi, dsi, fso, dso);
+ test(fso.size() == 3);
+ test(fso[0].size() == 1);
+ test(fso[0][0] == ::Ice::Float(3.14));
+ test(fso[1].size() == 1);
+ test(fso[1][0] == ::Ice::Float(1.11));
+ test(fso[2].size() == 0);
+ test(dso.size() == 1);
+ test(dso[0].size() == 3);
+ test(dso[0][0] == ::Ice::Double(1.1E10));
+ test(dso[0][1] == ::Ice::Double(1.2E10));
+ test(dso[0][2] == ::Ice::Double(1.3E10));
+ test(rso.size() == 2);
+ test(rso[0].size() == 3);
+ test(rso[0][0] == ::Ice::Double(1.1E10));
+ test(rso[0][1] == ::Ice::Double(1.2E10));
+ test(rso[0][2] == ::Ice::Double(1.3E10));
+ test(rso[1].size() == 3);
+ test(rso[1][0] == ::Ice::Double(1.1E10));
+ test(rso[1][1] == ::Ice::Double(1.2E10));
+ test(rso[1][2] == ::Ice::Double(1.3E10));
}
{
- Test::StringSS ssi1;
- ssi1.resize(2);
- Test::StringSS ssi2;
- ssi2.resize(3);
-
- ssi1[0].push_back("abc");
- ssi1[1].push_back("de");
- ssi1[1].push_back("fghi");
-
- ssi2[2].push_back("xyz");
-
- Test::StringSS sso;
- Test::StringSS rso;
-
- rso = p->opStringSS(ssi1, ssi2, sso);
- test(sso.size() == 5);
- test(sso[0].size() == 1);
- test(sso[0][0] == "abc");
- test(sso[1].size() == 2);
- test(sso[1][0] == "de");
- test(sso[1][1] == "fghi");
- test(sso[2].size() == 0);
- test(sso[3].size() == 0);
- test(sso[4].size() == 1);
- test(sso[4][0] == "xyz");
- test(rso.size() == 3);
- test(rso[0].size() == 1);
- test(rso[0][0] == "xyz");
- test(rso[1].size() == 0);
- test(rso[2].size() == 0);
+ Test::StringSS ssi1;
+ ssi1.resize(2);
+ Test::StringSS ssi2;
+ ssi2.resize(3);
+
+ ssi1[0].push_back("abc");
+ ssi1[1].push_back("de");
+ ssi1[1].push_back("fghi");
+
+ ssi2[2].push_back("xyz");
+
+ Test::StringSS sso;
+ Test::StringSS rso;
+
+ rso = p->opStringSS(ssi1, ssi2, sso);
+ test(sso.size() == 5);
+ test(sso[0].size() == 1);
+ test(sso[0][0] == "abc");
+ test(sso[1].size() == 2);
+ test(sso[1][0] == "de");
+ test(sso[1][1] == "fghi");
+ test(sso[2].size() == 0);
+ test(sso[3].size() == 0);
+ test(sso[4].size() == 1);
+ test(sso[4][0] == "xyz");
+ test(rso.size() == 3);
+ test(rso[0].size() == 1);
+ test(rso[0][0] == "xyz");
+ test(rso[1].size() == 0);
+ test(rso[2].size() == 0);
}
{
- Test::StringSSS sssi1;
- sssi1.resize(2);
- sssi1[0].resize(2);
- sssi1[0][0].push_back("abc");
- sssi1[0][0].push_back("de");
- sssi1[0][1].push_back("xyz");
- sssi1[1].resize(1);
- sssi1[1][0].push_back("hello");
-
- Test::StringSSS sssi2;
- sssi2.resize(3);
- sssi2[0].resize(2);
- sssi2[0][0].push_back("");
- sssi2[0][0].push_back("");
- sssi2[0][1].push_back("abcd");
- sssi2[1].resize(1);
- sssi2[1][0].push_back("");
-
- Test::StringSSS ssso;
- Test::StringSSS rsso;
-
- rsso = p->opStringSSS(sssi1, sssi2, ssso);
- test(ssso.size() == 5);
- test(ssso[0].size() == 2);
- test(ssso[0][0].size() == 2);
- test(ssso[0][1].size() == 1);
- test(ssso[1].size() == 1);
- test(ssso[1][0].size() == 1);
- test(ssso[2].size() == 2);
- test(ssso[2][0].size() == 2);
- test(ssso[2][1].size() == 1);
- test(ssso[3].size() == 1);
- test(ssso[3][0].size() == 1);
- test(ssso[4].size() == 0);
- test(ssso[0][0][0] == "abc");
- test(ssso[0][0][1] == "de");
- test(ssso[0][1][0] == "xyz");
- test(ssso[1][0][0] == "hello");
- test(ssso[2][0][0] == "");
- test(ssso[2][0][1] == "");
- test(ssso[2][1][0] == "abcd");
- test(ssso[3][0][0] == "");
-
- test(rsso.size() == 3);
- test(rsso[0].size() == 0);
- test(rsso[1].size() == 1);
- test(rsso[1][0].size() == 1);
- test(rsso[2].size() == 2);
- test(rsso[2][0].size() == 2);
- test(rsso[2][1].size() == 1);
- test(rsso[1][0][0] == "");
- test(rsso[2][0][0] == "");
- test(rsso[2][0][1] == "");
- test(rsso[2][1][0] == "abcd");
+ Test::StringSSS sssi1;
+ sssi1.resize(2);
+ sssi1[0].resize(2);
+ sssi1[0][0].push_back("abc");
+ sssi1[0][0].push_back("de");
+ sssi1[0][1].push_back("xyz");
+ sssi1[1].resize(1);
+ sssi1[1][0].push_back("hello");
+
+ Test::StringSSS sssi2;
+ sssi2.resize(3);
+ sssi2[0].resize(2);
+ sssi2[0][0].push_back("");
+ sssi2[0][0].push_back("");
+ sssi2[0][1].push_back("abcd");
+ sssi2[1].resize(1);
+ sssi2[1][0].push_back("");
+
+ Test::StringSSS ssso;
+ Test::StringSSS rsso;
+
+ rsso = p->opStringSSS(sssi1, sssi2, ssso);
+ test(ssso.size() == 5);
+ test(ssso[0].size() == 2);
+ test(ssso[0][0].size() == 2);
+ test(ssso[0][1].size() == 1);
+ test(ssso[1].size() == 1);
+ test(ssso[1][0].size() == 1);
+ test(ssso[2].size() == 2);
+ test(ssso[2][0].size() == 2);
+ test(ssso[2][1].size() == 1);
+ test(ssso[3].size() == 1);
+ test(ssso[3][0].size() == 1);
+ test(ssso[4].size() == 0);
+ test(ssso[0][0][0] == "abc");
+ test(ssso[0][0][1] == "de");
+ test(ssso[0][1][0] == "xyz");
+ test(ssso[1][0][0] == "hello");
+ test(ssso[2][0][0] == "");
+ test(ssso[2][0][1] == "");
+ test(ssso[2][1][0] == "abcd");
+ test(ssso[3][0][0] == "");
+
+ test(rsso.size() == 3);
+ test(rsso[0].size() == 0);
+ test(rsso[1].size() == 1);
+ test(rsso[1][0].size() == 1);
+ test(rsso[2].size() == 2);
+ test(rsso[2][0].size() == 2);
+ test(rsso[2][1].size() == 1);
+ test(rsso[1][0][0] == "");
+ test(rsso[2][0][0] == "");
+ test(rsso[2][0][1] == "");
+ test(rsso[2][1][0] == "abcd");
}
{
- Test::ByteBoolD di1;
- di1[10] = true;
- di1[100] = false;
- Test::ByteBoolD di2;
- di2[10] = true;
- di2[11] = false;
- di2[101] = true;
-
- Test::ByteBoolD _do;
- Test::ByteBoolD ro = p->opByteBoolD(di1, di2, _do);
-
- test(_do == di1);
- test(ro.size() == 4);
- test(ro[10] == true);
- test(ro[11] == false);
- test(ro[100] == false);
- test(ro[101] == true);
+ Test::ByteBoolD di1;
+ di1[10] = true;
+ di1[100] = false;
+ Test::ByteBoolD di2;
+ di2[10] = true;
+ di2[11] = false;
+ di2[101] = true;
+
+ Test::ByteBoolD _do;
+ Test::ByteBoolD ro = p->opByteBoolD(di1, di2, _do);
+
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro[10] == true);
+ test(ro[11] == false);
+ test(ro[100] == false);
+ test(ro[101] == true);
}
{
- Test::ShortIntD di1;
- di1[110] = -1;
- di1[1100] = 123123;
- Test::ShortIntD di2;
- di2[110] = -1;
- di2[111] = -100;
- di2[1101] = 0;
-
- Test::ShortIntD _do;
- Test::ShortIntD ro = p->opShortIntD(di1, di2, _do);
-
- test(_do == di1);
- test(ro.size() == 4);
- test(ro[110] == -1);
- test(ro[111] == -100);
- test(ro[1100] == 123123);
- test(ro[1101] == 0);
+ Test::ShortIntD di1;
+ di1[110] = -1;
+ di1[1100] = 123123;
+ Test::ShortIntD di2;
+ di2[110] = -1;
+ di2[111] = -100;
+ di2[1101] = 0;
+
+ Test::ShortIntD _do;
+ Test::ShortIntD ro = p->opShortIntD(di1, di2, _do);
+
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro[110] == -1);
+ test(ro[111] == -100);
+ test(ro[1100] == 123123);
+ test(ro[1101] == 0);
}
{
- Test::LongFloatD di1;
- di1[999999110] = Ice::Float(-1.1);
- di1[999999111] = Ice::Float(123123.2);
- Test::LongFloatD di2;
- di2[999999110] = Ice::Float(-1.1);
- di2[999999120] = Ice::Float(-100.4);
- di2[999999130] = Ice::Float(0.5);
-
- Test::LongFloatD _do;
- Test::LongFloatD ro = p->opLongFloatD(di1, di2, _do);
-
- test(_do == di1);
- test(ro.size() == 4);
- test(ro[999999110] == Ice::Float(-1.1));
- test(ro[999999120] == Ice::Float(-100.4));
- test(ro[999999111] == Ice::Float(123123.2));
- test(ro[999999130] == Ice::Float(0.5));
+ Test::LongFloatD di1;
+ di1[999999110] = Ice::Float(-1.1);
+ di1[999999111] = Ice::Float(123123.2);
+ Test::LongFloatD di2;
+ di2[999999110] = Ice::Float(-1.1);
+ di2[999999120] = Ice::Float(-100.4);
+ di2[999999130] = Ice::Float(0.5);
+
+ Test::LongFloatD _do;
+ Test::LongFloatD ro = p->opLongFloatD(di1, di2, _do);
+
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro[999999110] == Ice::Float(-1.1));
+ test(ro[999999120] == Ice::Float(-100.4));
+ test(ro[999999111] == Ice::Float(123123.2));
+ test(ro[999999130] == Ice::Float(0.5));
}
{
- Test::StringStringD di1;
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- Test::StringStringD di2;
- di2["foo"] = "abc -1.1";
- di2["FOO"] = "abc -100.4";
- di2["BAR"] = "abc 0.5";
-
- Test::StringStringD _do;
- Test::StringStringD ro = p->opStringStringD(di1, di2, _do);
-
- test(_do == di1);
- test(ro.size() == 4);
- test(ro["foo"] == "abc -1.1");
- test(ro["FOO"] == "abc -100.4");
- test(ro["bar"] == "abc 123123.2");
- test(ro["BAR"] == "abc 0.5");
+ Test::StringStringD di1;
+ di1["foo"] = "abc -1.1";
+ di1["bar"] = "abc 123123.2";
+ Test::StringStringD di2;
+ di2["foo"] = "abc -1.1";
+ di2["FOO"] = "abc -100.4";
+ di2["BAR"] = "abc 0.5";
+
+ Test::StringStringD _do;
+ Test::StringStringD ro = p->opStringStringD(di1, di2, _do);
+
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro["foo"] == "abc -1.1");
+ test(ro["FOO"] == "abc -100.4");
+ test(ro["bar"] == "abc 123123.2");
+ test(ro["BAR"] == "abc 0.5");
}
{
- Test::StringMyEnumD di1;
- di1["abc"] = Test::enum1;
- di1[""] = Test::enum2;
- Test::StringMyEnumD di2;
- di2["abc"] = Test::enum1;
- di2["qwerty"] = Test::enum3;
- di2["Hello!!"] = Test::enum2;
-
- Test::StringMyEnumD _do;
- Test::StringMyEnumD ro = p->opStringMyEnumD(di1, di2, _do);
-
- test(_do == di1);
- test(ro.size() == 4);
- test(ro["abc"] == Test::enum1);
- test(ro["qwerty"] == Test::enum3);
- test(ro[""] == Test::enum2);
- test(ro["Hello!!"] == Test::enum2);
+ Test::StringMyEnumD di1;
+ di1["abc"] = Test::enum1;
+ di1[""] = Test::enum2;
+ Test::StringMyEnumD di2;
+ di2["abc"] = Test::enum1;
+ di2["qwerty"] = Test::enum3;
+ di2["Hello!!"] = Test::enum2;
+
+ Test::StringMyEnumD _do;
+ Test::StringMyEnumD ro = p->opStringMyEnumD(di1, di2, _do);
+
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro["abc"] == Test::enum1);
+ test(ro["qwerty"] == Test::enum3);
+ test(ro[""] == Test::enum2);
+ test(ro["Hello!!"] == Test::enum2);
}
{
- const int lengths[] = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
-
- for(int l = 0; l != sizeof(lengths) / sizeof(*lengths); ++l)
- {
- Test::IntS s;
- for(int i = 0; i < lengths[l]; ++i)
- {
- s.push_back(i);
- }
- Test::IntS r = p->opIntS(s);
- test(r.size() == static_cast<size_t>(lengths[l]));
- for(int j = 0; j < static_cast<int>(r.size()); ++j)
- {
- test(r[j] == -j);
- }
- }
+ const int lengths[] = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
+
+ for(int l = 0; l != sizeof(lengths) / sizeof(*lengths); ++l)
+ {
+ Test::IntS s;
+ for(int i = 0; i < lengths[l]; ++i)
+ {
+ s.push_back(i);
+ }
+ Test::IntS r = p->opIntS(s);
+ test(r.size() == static_cast<size_t>(lengths[l]));
+ for(int j = 0; j < static_cast<int>(r.size()); ++j)
+ {
+ test(r[j] == -j);
+ }
+ }
}
{
- Ice::Context ctx;
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
- {
- Test::StringStringD r = p->opContext();
- test(p->ice_getContext().empty());
- test(r != ctx);
- }
- {
- Test::StringStringD r = p->opContext(ctx);
- test(p->ice_getContext().empty());
- test(r == ctx);
- }
- {
- Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
- test(p2->ice_getContext() == ctx);
- Test::StringStringD r = p2->opContext();
- test(r == ctx);
- r = p2->opContext(ctx);
- test(r == ctx);
- }
-
- {
- //
- // Test that default context is obtained correctly from communicator.
- //
+ Ice::Context ctx;
+ ctx["one"] = "ONE";
+ ctx["two"] = "TWO";
+ ctx["three"] = "THREE";
+ {
+ Test::StringStringD r = p->opContext();
+ test(p->ice_getContext().empty());
+ test(r != ctx);
+ }
+ {
+ Test::StringStringD r = p->opContext(ctx);
+ test(p->ice_getContext().empty());
+ test(r == ctx);
+ }
+ {
+ Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
+ test(p2->ice_getContext() == ctx);
+ Test::StringStringD r = p2->opContext();
+ test(r == ctx);
+ r = p2->opContext(ctx);
+ test(r == ctx);
+ }
+
+ {
+ //
+ // Test that default context is obtained correctly from communicator.
+ //
/* DEPRECATED
- Ice::Context dflt;
- dflt["a"] = "b";
- communicator->setDefaultContext(dflt);
- test(p->opContext() != dflt);
+ Ice::Context dflt;
+ dflt["a"] = "b";
+ communicator->setDefaultContext(dflt);
+ test(p->opContext() != dflt);
- Test::MyClassPrx p2 = Test::MyClassPrx::uncheckedCast(p->ice_context(Ice::Context()));
- test(p2->opContext().empty());
+ Test::MyClassPrx p2 = Test::MyClassPrx::uncheckedCast(p->ice_context(Ice::Context()));
+ test(p2->opContext().empty());
- p2 = Test::MyClassPrx::uncheckedCast(p->ice_defaultContext());
- test(p2->opContext() == dflt);
+ p2 = Test::MyClassPrx::uncheckedCast(p->ice_defaultContext());
+ test(p2->opContext() == dflt);
- communicator->setDefaultContext(Ice::Context());
- test(!p2->opContext().empty());
+ communicator->setDefaultContext(Ice::Context());
+ test(!p2->opContext().empty());
- communicator->setDefaultContext(dflt);
- Test::MyClassPrx c = Test::MyClassPrx::checkedCast(
- communicator->stringToProxy("test:default -p 12010 -t 10000"));
- test(c->opContext() == dflt);
+ communicator->setDefaultContext(dflt);
+ Test::MyClassPrx c = Test::MyClassPrx::checkedCast(
+ communicator->stringToProxy("test:default -p 12010 -t 10000"));
+ test(c->opContext() == dflt);
- dflt["a"] = "c";
- Test::MyClassPrx c2 = Test::MyClassPrx::uncheckedCast(c->ice_context(dflt));
- test(c2->opContext()["a"] == "c");
+ dflt["a"] = "c";
+ Test::MyClassPrx c2 = Test::MyClassPrx::uncheckedCast(c->ice_context(dflt));
+ test(c2->opContext()["a"] == "c");
- dflt.clear();
- Test::MyClassPrx c3 = Test::MyClassPrx::uncheckedCast(c2->ice_context(dflt));
- Ice::Context tmp = c3->opContext();
- test(tmp.find("a") == tmp.end());
+ dflt.clear();
+ Test::MyClassPrx c3 = Test::MyClassPrx::uncheckedCast(c2->ice_context(dflt));
+ Ice::Context tmp = c3->opContext();
+ test(tmp.find("a") == tmp.end());
- Test::MyClassPrx c4 = Test::MyClassPrx::uncheckedCast(c2->ice_defaultContext());
- test(c4->opContext()["a"] == "b");
+ Test::MyClassPrx c4 = Test::MyClassPrx::uncheckedCast(c2->ice_defaultContext());
+ test(c4->opContext()["a"] == "b");
- dflt["a"] = "d";
- communicator->setDefaultContext(dflt);
+ dflt["a"] = "d";
+ communicator->setDefaultContext(dflt);
- Test::MyClassPrx c5 = Test::MyClassPrx::uncheckedCast(c->ice_defaultContext());
- test(c5->opContext()["a"] == "d");
+ Test::MyClassPrx c5 = Test::MyClassPrx::uncheckedCast(c->ice_defaultContext());
+ test(c5->opContext()["a"] == "d");
- communicator->setDefaultContext(Ice::Context());
+ communicator->setDefaultContext(Ice::Context());
*/
- }
-
- {
- //
- // Test implicit context propagation
- //
-
- string impls[] = {"Shared", "SharedWithoutLocking", "PerThread"};
- for(int i = 0; i < 3; i++)
- {
- Ice::InitializationData initData;
- initData.properties = communicator->getProperties()->clone();
- initData.properties->setProperty("Ice.ImplicitContext", impls[i]);
-
- Ice::CommunicatorPtr ic = Ice::initialize(initData);
-
- Ice::Context ctx;
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
-
- Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(
- ic->stringToProxy("test:default -p 12010 -t 10000"));
-
- ic->getImplicitContext()->setContext(ctx);
- test(ic->getImplicitContext()->getContext() == ctx);
- test(p->opContext() == ctx);
-
- ic->getImplicitContext()->set("zero", "ZERO");
- test(ic->getImplicitContext()->get("zero") == "ZERO");
- test(ic->getImplicitContext()->getWithDefault("foobar", "foo") == "foo");
-
- ctx = ic->getImplicitContext()->getContext();
- test(p->opContext() == ctx);
-
- Ice::Context prxContext;
- prxContext["one"] = "UN";
- prxContext["four"] = "QUATRE";
-
- Ice::Context combined = prxContext;
- combined.insert(ctx.begin(), ctx.end());
- test(combined["one"] == "UN");
-
- p = Test::MyClassPrx::uncheckedCast(p->ice_context(prxContext));
-
- ic->getImplicitContext()->setContext(Ice::Context());
- test(p->opContext() == prxContext);
-
- ic->getImplicitContext()->setContext(ctx);
- test(p->opContext() == combined);
-
- ic->destroy();
- }
- }
-
+ }
+
+ {
+ //
+ // Test implicit context propagation
+ //
+
+ string impls[] = {"Shared", "SharedWithoutLocking", "PerThread"};
+ for(int i = 0; i < 3; i++)
+ {
+ Ice::InitializationData initData;
+ initData.properties = communicator->getProperties()->clone();
+ initData.properties->setProperty("Ice.ImplicitContext", impls[i]);
+
+ Ice::CommunicatorPtr ic = Ice::initialize(initData);
+
+ Ice::Context ctx;
+ ctx["one"] = "ONE";
+ ctx["two"] = "TWO";
+ ctx["three"] = "THREE";
+
+ Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(
+ ic->stringToProxy("test:default -p 12010 -t 10000"));
+
+ ic->getImplicitContext()->setContext(ctx);
+ test(ic->getImplicitContext()->getContext() == ctx);
+ test(p->opContext() == ctx);
+
+ ic->getImplicitContext()->set("zero", "ZERO");
+ test(ic->getImplicitContext()->get("zero") == "ZERO");
+ test(ic->getImplicitContext()->getWithDefault("foobar", "foo") == "foo");
+
+ ctx = ic->getImplicitContext()->getContext();
+ test(p->opContext() == ctx);
+
+ Ice::Context prxContext;
+ prxContext["one"] = "UN";
+ prxContext["four"] = "QUATRE";
+
+ Ice::Context combined = prxContext;
+ combined.insert(ctx.begin(), ctx.end());
+ test(combined["one"] == "UN");
+
+ p = Test::MyClassPrx::uncheckedCast(p->ice_context(prxContext));
+
+ ic->getImplicitContext()->setContext(Ice::Context());
+ test(p->opContext() == prxContext);
+
+ ic->getImplicitContext()->setContext(ctx);
+ test(p->opContext() == combined);
+
+ ic->destroy();
+ }
+ }
+
}
{
Ice::Double d = 1278312346.0 / 13.0;
- Test::DoubleS ds(5, d);
- p->opDoubleMarshaling(d, ds);
+ Test::DoubleS ds(5, d);
+ p->opDoubleMarshaling(d, ds);
}
}
diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp
index 55cfdaf9841..37bdf2895b4 100644
--- a/cpp/test/Ice/operations/TwowaysAMI.cpp
+++ b/cpp/test/Ice/operations/TwowaysAMI.cpp
@@ -29,7 +29,7 @@ class CallbackBase : public IceUtil::Monitor<IceUtil::Mutex>
public:
CallbackBase() :
- _called(false)
+ _called(false)
{
}
@@ -39,26 +39,26 @@ public:
bool check()
{
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
- while(!_called)
- {
- if(!timedWait(IceUtil::Time::seconds(5)))
- {
- return false;
- }
- }
- _called = false;
- return true;
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ while(!_called)
+ {
+ if(!timedWait(IceUtil::Time::seconds(5)))
+ {
+ return false;
+ }
+ }
+ _called = false;
+ return true;
}
protected:
void called()
{
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
- assert(!_called);
- _called = true;
- notify();
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ assert(!_called);
+ _called = true;
+ notify();
}
private:
@@ -72,12 +72,12 @@ public:
virtual void ice_response()
{
- called();
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -89,12 +89,12 @@ public:
virtual void ice_response()
{
- test(false);
+ test(false);
}
virtual void ice_exception(const ::Ice::Exception& ex)
{
- test(dynamic_cast<const ::Ice::TwowayOnlyException*>(&ex));
+ test(dynamic_cast<const ::Ice::TwowayOnlyException*>(&ex));
called();
}
};
@@ -107,14 +107,14 @@ public:
virtual void ice_response(::Ice::Byte r, ::Ice::Byte b)
{
- test(b == Ice::Byte(0xf0));
- test(r == Ice::Byte(0xff));
- called();
+ test(b == Ice::Byte(0xf0));
+ test(r == Ice::Byte(0xff));
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -126,12 +126,12 @@ public:
virtual void ice_response(::Ice::Byte r, ::Ice::Byte b)
{
- test(false);
+ test(false);
}
virtual void ice_exception(const ::Ice::Exception& ex)
{
- test(dynamic_cast<const ::Ice::TwowayOnlyException*>(&ex));
+ test(dynamic_cast<const ::Ice::TwowayOnlyException*>(&ex));
called();
}
};
@@ -145,14 +145,14 @@ public:
virtual void ice_response(bool r, bool b)
{
- test(b);
- test(!r);
- called();
+ test(b);
+ test(!r);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -164,16 +164,16 @@ public:
virtual void ice_response(::Ice::Long r, ::Ice::Short s, ::Ice::Int i, ::Ice::Long l)
{
- test(s == 10);
- test(i == 11);
- test(l == 12);
- test(r == 12);
- called();
+ test(s == 10);
+ test(i == 11);
+ test(l == 12);
+ test(r == 12);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -185,15 +185,15 @@ public:
virtual void ice_response(::Ice::Double r, ::Ice::Float f, ::Ice::Double d)
{
- test(f == Ice::Float(3.14));
- test(d == Ice::Double(1.1E10));
- test(r == Ice::Double(1.1E10));
- called();
+ test(f == Ice::Float(3.14));
+ test(d == Ice::Double(1.1E10));
+ test(r == Ice::Double(1.1E10));
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -205,14 +205,14 @@ public:
virtual void ice_response(const ::std::string& r, const ::std::string& s)
{
- test(s == "world hello");
- test(r == "hello world");
- called();
+ test(s == "world hello");
+ test(r == "hello world");
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -224,14 +224,14 @@ public:
virtual void ice_response(::Test::MyEnum r, ::Test::MyEnum e)
{
- test(e == Test::enum2);
- test(r == Test::enum3);
- called();
+ test(e == Test::enum2);
+ test(r == Test::enum3);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -248,29 +248,29 @@ public:
virtual void ice_response(const ::Test::MyClassPrx& r, const ::Test::MyClassPrx& c1, const ::Test::MyClassPrx& c2)
{
- test(c1->ice_getIdentity() == _communicator->stringToIdentity("test"));
- test(c2->ice_getIdentity() == _communicator->stringToIdentity("noSuchIdentity"));
- test(r->ice_getIdentity() == _communicator->stringToIdentity("test"));
- // We can't do the callbacks below in thread per connection mode.
- if(!_communicator->getProperties()->getPropertyAsInt("Ice.ThreadPerConnection"))
- {
- r->opVoid();
- c1->opVoid();
- try
- {
- c2->opVoid();
- test(false);
- }
- catch(const Ice::ObjectNotExistException&)
- {
- }
- }
- called();
+ test(c1->ice_getIdentity() == _communicator->stringToIdentity("test"));
+ test(c2->ice_getIdentity() == _communicator->stringToIdentity("noSuchIdentity"));
+ test(r->ice_getIdentity() == _communicator->stringToIdentity("test"));
+ // We can't do the callbacks below in thread per connection mode.
+ if(!_communicator->getProperties()->getPropertyAsInt("Ice.ThreadPerConnection"))
+ {
+ r->opVoid();
+ c1->opVoid();
+ try
+ {
+ c2->opVoid();
+ test(false);
+ }
+ catch(const Ice::ObjectNotExistException&)
+ {
+ }
+ }
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
private:
@@ -291,22 +291,22 @@ public:
virtual void ice_response(const ::Test::Structure& rso, const ::Test::Structure& so)
{
- test(rso.p == 0);
- test(rso.e == Test::enum2);
- test(rso.s.s == "def");
- test(so.e == Test::enum3);
- test(so.s.s == "a new string");
- // We can't do the callbacks below in thread per connection mode.
- if(!_communicator->getProperties()->getPropertyAsInt("Ice.ThreadPerConnection"))
- {
- so.p->opVoid();
- }
- called();
+ test(rso.p == 0);
+ test(rso.e == Test::enum2);
+ test(rso.s.s == "def");
+ test(so.e == Test::enum3);
+ test(so.s.s == "a new string");
+ // We can't do the callbacks below in thread per connection mode.
+ if(!_communicator->getProperties()->getPropertyAsInt("Ice.ThreadPerConnection"))
+ {
+ so.p->opVoid();
+ }
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
private:
@@ -322,26 +322,26 @@ public:
virtual void ice_response(const ::Test::ByteS& rso, const ::Test::ByteS& bso)
{
- test(bso.size() == 4);
- test(bso[0] == Ice::Byte(0x22));
- test(bso[1] == Ice::Byte(0x12));
- test(bso[2] == Ice::Byte(0x11));
- test(bso[3] == Ice::Byte(0x01));
- test(rso.size() == 8);
- test(rso[0] == Ice::Byte(0x01));
- test(rso[1] == Ice::Byte(0x11));
- test(rso[2] == Ice::Byte(0x12));
- test(rso[3] == Ice::Byte(0x22));
- test(rso[4] == Ice::Byte(0xf1));
- test(rso[5] == Ice::Byte(0xf2));
- test(rso[6] == Ice::Byte(0xf3));
- test(rso[7] == Ice::Byte(0xf4));
- called();
+ test(bso.size() == 4);
+ test(bso[0] == Ice::Byte(0x22));
+ test(bso[1] == Ice::Byte(0x12));
+ test(bso[2] == Ice::Byte(0x11));
+ test(bso[3] == Ice::Byte(0x01));
+ test(rso.size() == 8);
+ test(rso[0] == Ice::Byte(0x01));
+ test(rso[1] == Ice::Byte(0x11));
+ test(rso[2] == Ice::Byte(0x12));
+ test(rso[3] == Ice::Byte(0x22));
+ test(rso[4] == Ice::Byte(0xf1));
+ test(rso[5] == Ice::Byte(0xf2));
+ test(rso[6] == Ice::Byte(0xf3));
+ test(rso[7] == Ice::Byte(0xf4));
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -353,21 +353,21 @@ public:
virtual void ice_response(const ::Test::BoolS& rso, const ::Test::BoolS& bso)
{
- test(bso.size() == 4);
- test(bso[0]);
- test(bso[1]);
- test(!bso[2]);
- test(!bso[3]);
- test(rso.size() == 3);
- test(!rso[0]);
- test(rso[1]);
- test(rso[2]);
- called();
+ test(bso.size() == 4);
+ test(bso[0]);
+ test(bso[1]);
+ test(!bso[2]);
+ test(!bso[3]);
+ test(rso.size() == 3);
+ test(!rso[0]);
+ test(rso[1]);
+ test(rso[2]);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -378,34 +378,34 @@ class AMI_MyClass_opShortIntLongSI : public Test::AMI_MyClass_opShortIntLongS, p
public:
virtual void ice_response(const ::Test::LongS& rso, const ::Test::ShortS& sso, const ::Test::IntS& iso,
- const ::Test::LongS& lso)
- {
- test(sso.size() == 3);
- test(sso[0] == 1);
- test(sso[1] == 2);
- test(sso[2] == 3);
- test(iso.size() == 4);
- test(iso[0] == 8);
- test(iso[1] == 7);
- test(iso[2] == 6);
- test(iso[3] == 5);
- test(lso.size() == 6);
- test(lso[0] == 10);
- test(lso[1] == 30);
- test(lso[2] == 20);
- test(lso[3] == 10);
- test(lso[4] == 30);
- test(lso[5] == 20);
- test(rso.size() == 3);
- test(rso[0] == 10);
- test(rso[1] == 30);
- test(rso[2] == 20);
- called();
+ const ::Test::LongS& lso)
+ {
+ test(sso.size() == 3);
+ test(sso[0] == 1);
+ test(sso[1] == 2);
+ test(sso[2] == 3);
+ test(iso.size() == 4);
+ test(iso[0] == 8);
+ test(iso[1] == 7);
+ test(iso[2] == 6);
+ test(iso[3] == 5);
+ test(lso.size() == 6);
+ test(lso[0] == 10);
+ test(lso[1] == 30);
+ test(lso[2] == 20);
+ test(lso[3] == 10);
+ test(lso[4] == 30);
+ test(lso[5] == 20);
+ test(rso.size() == 3);
+ test(rso[0] == 10);
+ test(rso[1] == 30);
+ test(rso[2] == 20);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -417,25 +417,25 @@ public:
virtual void ice_response(const ::Test::DoubleS& rso, const ::Test::FloatS& fso, const ::Test::DoubleS& dso)
{
- test(fso.size() == 2);
- test(fso[0] == ::Ice::Float(3.14));
- test(fso[1] == ::Ice::Float(1.11));
- test(dso.size() == 3);
- test(dso[0] == ::Ice::Double(1.3E10));
- test(dso[1] == ::Ice::Double(1.2E10));
- test(dso[2] == ::Ice::Double(1.1E10));
- test(rso.size() == 5);
- test(rso[0] == ::Ice::Double(1.1E10));
- test(rso[1] == ::Ice::Double(1.2E10));
- test(rso[2] == ::Ice::Double(1.3E10));
- test(::Ice::Float(rso[3]) == ::Ice::Float(3.14));
- test(::Ice::Float(rso[4]) == ::Ice::Float(1.11));
- called();
+ test(fso.size() == 2);
+ test(fso[0] == ::Ice::Float(3.14));
+ test(fso[1] == ::Ice::Float(1.11));
+ test(dso.size() == 3);
+ test(dso[0] == ::Ice::Double(1.3E10));
+ test(dso[1] == ::Ice::Double(1.2E10));
+ test(dso[2] == ::Ice::Double(1.1E10));
+ test(rso.size() == 5);
+ test(rso[0] == ::Ice::Double(1.1E10));
+ test(rso[1] == ::Ice::Double(1.2E10));
+ test(rso[2] == ::Ice::Double(1.3E10));
+ test(::Ice::Float(rso[3]) == ::Ice::Float(3.14));
+ test(::Ice::Float(rso[4]) == ::Ice::Float(1.11));
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -447,21 +447,21 @@ public:
virtual void ice_response(const ::Test::StringS& rso, const ::Test::StringS& sso)
{
- test(sso.size() == 4);
- test(sso[0] == "abc");
- test(sso[1] == "de");
- test(sso[2] == "fghi");
- test(sso[3] == "xyz");
- test(rso.size() == 3);
- test(rso[0] == "fghi");
- test(rso[1] == "de");
- test(rso[2] == "abc");
- called();
+ test(sso.size() == 4);
+ test(sso[0] == "abc");
+ test(sso[1] == "de");
+ test(sso[2] == "fghi");
+ test(sso[3] == "xyz");
+ test(rso.size() == 3);
+ test(rso[0] == "fghi");
+ test(rso[1] == "de");
+ test(rso[2] == "abc");
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -473,31 +473,31 @@ public:
virtual void ice_response(const ::Test::ByteSS& rso, const ::Test::ByteSS& bso)
{
- test(bso.size() == 2);
- test(bso[0].size() == 1);
- test(bso[0][0] == Ice::Byte(0xff));
- test(bso[1].size() == 3);
- test(bso[1][0] == Ice::Byte(0x01));
- test(bso[1][1] == Ice::Byte(0x11));
- test(bso[1][2] == Ice::Byte(0x12));
- test(rso.size() == 4);
- test(rso[0].size() == 3);
- test(rso[0][0] == Ice::Byte(0x01));
- test(rso[0][1] == Ice::Byte(0x11));
- test(rso[0][2] == Ice::Byte(0x12));
- test(rso[1].size() == 1);
- test(rso[1][0] == Ice::Byte(0xff));
- test(rso[2].size() == 1);
- test(rso[2][0] == Ice::Byte(0x0e));
- test(rso[3].size() == 2);
- test(rso[3][0] == Ice::Byte(0xf2));
- test(rso[3][1] == Ice::Byte(0xf1));
- called();
+ test(bso.size() == 2);
+ test(bso[0].size() == 1);
+ test(bso[0][0] == Ice::Byte(0xff));
+ test(bso[1].size() == 3);
+ test(bso[1][0] == Ice::Byte(0x01));
+ test(bso[1][1] == Ice::Byte(0x11));
+ test(bso[1][2] == Ice::Byte(0x12));
+ test(rso.size() == 4);
+ test(rso[0].size() == 3);
+ test(rso[0][0] == Ice::Byte(0x01));
+ test(rso[0][1] == Ice::Byte(0x11));
+ test(rso[0][2] == Ice::Byte(0x12));
+ test(rso[1].size() == 1);
+ test(rso[1][0] == Ice::Byte(0xff));
+ test(rso[2].size() == 1);
+ test(rso[2][0] == Ice::Byte(0x0e));
+ test(rso[3].size() == 2);
+ test(rso[3][0] == Ice::Byte(0xf2));
+ test(rso[3][1] == Ice::Byte(0xf1));
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -509,12 +509,12 @@ public:
virtual void ice_response(const ::Test::BoolSS&, const ::Test::BoolSS& bso)
{
- called();
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -525,14 +525,14 @@ class AMI_MyClass_opShortIntLongSSI : public Test::AMI_MyClass_opShortIntLongSS,
public:
virtual void ice_response(const ::Test::LongSS&, const ::Test::ShortSS&, const ::Test::IntSS&,
- const ::Test::LongSS&)
+ const ::Test::LongSS&)
{
- called();
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -544,32 +544,32 @@ public:
virtual void ice_response(const ::Test::DoubleSS& rso, const ::Test::FloatSS& fso, const ::Test::DoubleSS& dso)
{
- test(fso.size() == 3);
- test(fso[0].size() == 1);
- test(fso[0][0] == ::Ice::Float(3.14));
- test(fso[1].size() == 1);
- test(fso[1][0] == ::Ice::Float(1.11));
- test(fso[2].size() == 0);
- test(dso.size() == 1);
- test(dso[0].size() == 3);
- test(dso[0][0] == ::Ice::Double(1.1E10));
- test(dso[0][1] == ::Ice::Double(1.2E10));
- test(dso[0][2] == ::Ice::Double(1.3E10));
- test(rso.size() == 2);
- test(rso[0].size() == 3);
- test(rso[0][0] == ::Ice::Double(1.1E10));
- test(rso[0][1] == ::Ice::Double(1.2E10));
- test(rso[0][2] == ::Ice::Double(1.3E10));
- test(rso[1].size() == 3);
- test(rso[1][0] == ::Ice::Double(1.1E10));
- test(rso[1][1] == ::Ice::Double(1.2E10));
- test(rso[1][2] == ::Ice::Double(1.3E10));
- called();
+ test(fso.size() == 3);
+ test(fso[0].size() == 1);
+ test(fso[0][0] == ::Ice::Float(3.14));
+ test(fso[1].size() == 1);
+ test(fso[1][0] == ::Ice::Float(1.11));
+ test(fso[2].size() == 0);
+ test(dso.size() == 1);
+ test(dso[0].size() == 3);
+ test(dso[0][0] == ::Ice::Double(1.1E10));
+ test(dso[0][1] == ::Ice::Double(1.2E10));
+ test(dso[0][2] == ::Ice::Double(1.3E10));
+ test(rso.size() == 2);
+ test(rso[0].size() == 3);
+ test(rso[0][0] == ::Ice::Double(1.1E10));
+ test(rso[0][1] == ::Ice::Double(1.2E10));
+ test(rso[0][2] == ::Ice::Double(1.3E10));
+ test(rso[1].size() == 3);
+ test(rso[1][0] == ::Ice::Double(1.1E10));
+ test(rso[1][1] == ::Ice::Double(1.2E10));
+ test(rso[1][2] == ::Ice::Double(1.3E10));
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -581,27 +581,27 @@ public:
virtual void ice_response(const ::Test::StringSS& rso, const ::Test::StringSS& sso)
{
- test(sso.size() == 5);
- test(sso[0].size() == 1);
- test(sso[0][0] == "abc");
- test(sso[1].size() == 2);
- test(sso[1][0] == "de");
- test(sso[1][1] == "fghi");
- test(sso[2].size() == 0);
- test(sso[3].size() == 0);
- test(sso[4].size() == 1);
- test(sso[4][0] == "xyz");
- test(rso.size() == 3);
- test(rso[0].size() == 1);
- test(rso[0][0] == "xyz");
- test(rso[1].size() == 0);
- test(rso[2].size() == 0);
- called();
+ test(sso.size() == 5);
+ test(sso[0].size() == 1);
+ test(sso[0][0] == "abc");
+ test(sso[1].size() == 2);
+ test(sso[1][0] == "de");
+ test(sso[1][1] == "fghi");
+ test(sso[2].size() == 0);
+ test(sso[3].size() == 0);
+ test(sso[4].size() == 1);
+ test(sso[4][0] == "xyz");
+ test(rso.size() == 3);
+ test(rso[0].size() == 1);
+ test(rso[0][0] == "xyz");
+ test(rso[1].size() == 0);
+ test(rso[2].size() == 0);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -613,25 +613,25 @@ public:
virtual void ice_response(const ::Test::ByteBoolD& ro, const ::Test::ByteBoolD& _do)
{
- Test::ByteBoolD di1;
- di1[10] = true;
- di1[100] = false;
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find(10) != ro.end());
- test(ro.find(10)->second == true);
- test(ro.find(11) != ro.end());
- test(ro.find(11)->second == false);
- test(ro.find(100) != ro.end());
- test(ro.find(100)->second == false);
- test(ro.find(101) != ro.end());
- test(ro.find(101)->second == true);
- called();
+ Test::ByteBoolD di1;
+ di1[10] = true;
+ di1[100] = false;
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro.find(10) != ro.end());
+ test(ro.find(10)->second == true);
+ test(ro.find(11) != ro.end());
+ test(ro.find(11)->second == false);
+ test(ro.find(100) != ro.end());
+ test(ro.find(100)->second == false);
+ test(ro.find(101) != ro.end());
+ test(ro.find(101)->second == true);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -643,25 +643,25 @@ public:
virtual void ice_response(const ::Test::ShortIntD& ro, const ::Test::ShortIntD& _do)
{
- Test::ShortIntD di1;
- di1[110] = -1;
- di1[1100] = 123123;
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find(110) != ro.end());
- test(ro.find(110)->second == -1);
- test(ro.find(111) != ro.end());
- test(ro.find(111)->second == -100);
- test(ro.find(1100) != ro.end());
- test(ro.find(1100)->second == 123123);
- test(ro.find(1101) != ro.end());
- test(ro.find(1101)->second == 0);
- called();
+ Test::ShortIntD di1;
+ di1[110] = -1;
+ di1[1100] = 123123;
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro.find(110) != ro.end());
+ test(ro.find(110)->second == -1);
+ test(ro.find(111) != ro.end());
+ test(ro.find(111)->second == -100);
+ test(ro.find(1100) != ro.end());
+ test(ro.find(1100)->second == 123123);
+ test(ro.find(1101) != ro.end());
+ test(ro.find(1101)->second == 0);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -673,25 +673,25 @@ public:
virtual void ice_response(const ::Test::LongFloatD& ro, const ::Test::LongFloatD& _do)
{
- Test::LongFloatD di1;
- di1[999999110] = Ice::Float(-1.1);
- di1[999999111] = Ice::Float(123123.2);
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find(999999110) != ro.end());
- test(ro.find(999999110)->second == Ice::Float(-1.1));
- test(ro.find(999999120) != ro.end());
- test(ro.find(999999120)->second == Ice::Float(-100.4));
- test(ro.find(999999111) != ro.end());
- test(ro.find(999999111)->second == Ice::Float(123123.2));
- test(ro.find(999999130) != ro.end());
- test(ro.find(999999130)->second == Ice::Float(0.5));
- called();
+ Test::LongFloatD di1;
+ di1[999999110] = Ice::Float(-1.1);
+ di1[999999111] = Ice::Float(123123.2);
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro.find(999999110) != ro.end());
+ test(ro.find(999999110)->second == Ice::Float(-1.1));
+ test(ro.find(999999120) != ro.end());
+ test(ro.find(999999120)->second == Ice::Float(-100.4));
+ test(ro.find(999999111) != ro.end());
+ test(ro.find(999999111)->second == Ice::Float(123123.2));
+ test(ro.find(999999130) != ro.end());
+ test(ro.find(999999130)->second == Ice::Float(0.5));
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -703,25 +703,25 @@ public:
virtual void ice_response(const ::Test::StringStringD& ro, const ::Test::StringStringD& _do)
{
- Test::StringStringD di1;
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find("foo") != ro.end());
- test(ro.find("foo")->second == "abc -1.1");
- test(ro.find("FOO") != ro.end());
- test(ro.find("FOO")->second == "abc -100.4");
- test(ro.find("bar") != ro.end());
- test(ro.find("bar")->second == "abc 123123.2");
- test(ro.find("BAR") != ro.end());
- test(ro.find("BAR")->second == "abc 0.5");
- called();
+ Test::StringStringD di1;
+ di1["foo"] = "abc -1.1";
+ di1["bar"] = "abc 123123.2";
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro.find("foo") != ro.end());
+ test(ro.find("foo")->second == "abc -1.1");
+ test(ro.find("FOO") != ro.end());
+ test(ro.find("FOO")->second == "abc -100.4");
+ test(ro.find("bar") != ro.end());
+ test(ro.find("bar")->second == "abc 123123.2");
+ test(ro.find("BAR") != ro.end());
+ test(ro.find("BAR")->second == "abc 0.5");
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -733,25 +733,25 @@ public:
virtual void ice_response(const ::Test::StringMyEnumD& ro, const ::Test::StringMyEnumD& _do)
{
- Test::StringMyEnumD di1;
- di1["abc"] = Test::enum1;
- di1[""] = Test::enum2;
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find("abc") != ro.end());
- test(ro.find("abc")->second == Test::enum1);
- test(ro.find("qwerty") != ro.end());
- test(ro.find("qwerty")->second == Test::enum3);
- test(ro.find("") != ro.end());
- test(ro.find("")->second == Test::enum2);
- test(ro.find("Hello!!") != ro.end());
- test(ro.find("Hello!!")->second == Test::enum2);
- called();
+ Test::StringMyEnumD di1;
+ di1["abc"] = Test::enum1;
+ di1[""] = Test::enum2;
+ test(_do == di1);
+ test(ro.size() == 4);
+ test(ro.find("abc") != ro.end());
+ test(ro.find("abc")->second == Test::enum1);
+ test(ro.find("qwerty") != ro.end());
+ test(ro.find("qwerty")->second == Test::enum3);
+ test(ro.find("") != ro.end());
+ test(ro.find("")->second == Test::enum2);
+ test(ro.find("Hello!!") != ro.end());
+ test(ro.find("Hello!!")->second == Test::enum2);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -765,17 +765,17 @@ public:
virtual void ice_response(const Test::IntS& r)
{
- test(r.size() == static_cast<size_t>(_l));
- for(int j = 0; j < _l; ++j)
- {
- test(r[j] == -j);
- }
- called();
+ test(r.size() == static_cast<size_t>(_l));
+ for(int j = 0; j < _l; ++j)
+ {
+ test(r[j] == -j);
+ }
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
private:
@@ -795,13 +795,13 @@ public:
virtual void ice_response(const Test::StringStringD& r)
{
- test(r == _d);
- called();
+ test(r == _d);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
private:
@@ -821,13 +821,13 @@ public:
virtual void ice_response(const Test::StringStringD& r)
{
- test(r != _d);
- called();
+ test(r != _d);
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
private:
@@ -843,12 +843,12 @@ public:
virtual void ice_response()
{
- called();
+ called();
}
virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ test(false);
}
};
@@ -860,12 +860,12 @@ public:
virtual void ice_response()
{
- called();
+ called();
}
virtual void ice_exception(const ::Ice::Exception& ex)
{
- test(false);
+ test(false);
}
};
@@ -876,541 +876,541 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
{
{
// Check that a call to a void operation raises TwowayOnlyException
- // in the ice_exception() callback instead of at the point of call.
- Test::MyClassPrx oneway = Test::MyClassPrx::uncheckedCast(p->ice_oneway());
- AMI_MyClass_opVoidExIPtr cb = new AMI_MyClass_opVoidExI;
- try {
- oneway->opVoid_async(cb);
- }
- catch(const Ice::Exception&)
- {
- test(false);
- }
- test(cb->check());
+ // in the ice_exception() callback instead of at the point of call.
+ Test::MyClassPrx oneway = Test::MyClassPrx::uncheckedCast(p->ice_oneway());
+ AMI_MyClass_opVoidExIPtr cb = new AMI_MyClass_opVoidExI;
+ try {
+ oneway->opVoid_async(cb);
+ }
+ catch(const Ice::Exception&)
+ {
+ test(false);
+ }
+ test(cb->check());
}
{
// Check that a call to a twoway operation raises TwowayOnlyException
- // in the ice_exception() callback instead of at the point of call.
- Test::MyClassPrx oneway = Test::MyClassPrx::uncheckedCast(p->ice_oneway());
- AMI_MyClass_opByteExIPtr cb = new AMI_MyClass_opByteExI;
- try
- {
- oneway->opByte_async(cb, 0, 0);
- }
- catch(const Ice::Exception&)
- {
- test(false);
- }
- test(cb->check());
+ // in the ice_exception() callback instead of at the point of call.
+ Test::MyClassPrx oneway = Test::MyClassPrx::uncheckedCast(p->ice_oneway());
+ AMI_MyClass_opByteExIPtr cb = new AMI_MyClass_opByteExI;
+ try
+ {
+ oneway->opByte_async(cb, 0, 0);
+ }
+ catch(const Ice::Exception&)
+ {
+ test(false);
+ }
+ test(cb->check());
}
{
- AMI_MyClass_opVoidIPtr cb = new AMI_MyClass_opVoidI;
- p->opVoid_async(cb);
- test(cb->check());
- // Let's check if we can reuse the same callback object for another call.
- p->opVoid_async(cb);
- test(cb->check());
+ AMI_MyClass_opVoidIPtr cb = new AMI_MyClass_opVoidI;
+ p->opVoid_async(cb);
+ test(cb->check());
+ // Let's check if we can reuse the same callback object for another call.
+ p->opVoid_async(cb);
+ test(cb->check());
}
{
- AMI_MyClass_opByteIPtr cb = new AMI_MyClass_opByteI;
- p->opByte_async(cb, Ice::Byte(0xff), Ice::Byte(0x0f));
- test(cb->check());
+ AMI_MyClass_opByteIPtr cb = new AMI_MyClass_opByteI;
+ p->opByte_async(cb, Ice::Byte(0xff), Ice::Byte(0x0f));
+ test(cb->check());
}
{
- AMI_MyClass_opBoolIPtr cb = new AMI_MyClass_opBoolI;
- p->opBool_async(cb, true, false);
- test(cb->check());
+ AMI_MyClass_opBoolIPtr cb = new AMI_MyClass_opBoolI;
+ p->opBool_async(cb, true, false);
+ test(cb->check());
}
{
- AMI_MyClass_opShortIntLongIPtr cb = new AMI_MyClass_opShortIntLongI;
- p->opShortIntLong_async(cb, 10, 11, 12);
- test(cb->check());
+ AMI_MyClass_opShortIntLongIPtr cb = new AMI_MyClass_opShortIntLongI;
+ p->opShortIntLong_async(cb, 10, 11, 12);
+ test(cb->check());
}
{
- AMI_MyClass_opFloatDoubleIPtr cb = new AMI_MyClass_opFloatDoubleI;
- p->opFloatDouble_async(cb, Ice::Float(3.14), Ice::Double(1.1E10));
- test(cb->check());
- // Let's check if we can reuse the same callback object for another call.
- p->opFloatDouble_async(cb, Ice::Float(3.14), Ice::Double(1.1E10));
- test(cb->check());
+ AMI_MyClass_opFloatDoubleIPtr cb = new AMI_MyClass_opFloatDoubleI;
+ p->opFloatDouble_async(cb, Ice::Float(3.14), Ice::Double(1.1E10));
+ test(cb->check());
+ // Let's check if we can reuse the same callback object for another call.
+ p->opFloatDouble_async(cb, Ice::Float(3.14), Ice::Double(1.1E10));
+ test(cb->check());
}
{
- AMI_MyClass_opStringIPtr cb = new AMI_MyClass_opStringI;
- p->opString_async(cb, "hello", "world");
- test(cb->check());
+ AMI_MyClass_opStringIPtr cb = new AMI_MyClass_opStringI;
+ p->opString_async(cb, "hello", "world");
+ test(cb->check());
}
{
- AMI_MyClass_opMyEnumIPtr cb = new AMI_MyClass_opMyEnumI;
- p->opMyEnum_async(cb, Test::enum2);
- test(cb->check());
+ AMI_MyClass_opMyEnumIPtr cb = new AMI_MyClass_opMyEnumI;
+ p->opMyEnum_async(cb, Test::enum2);
+ test(cb->check());
}
{
- AMI_MyClass_opMyClassIPtr cb = new AMI_MyClass_opMyClassI(communicator);
- p->opMyClass_async(cb, p);
- test(cb->check());
+ AMI_MyClass_opMyClassIPtr cb = new AMI_MyClass_opMyClassI(communicator);
+ p->opMyClass_async(cb, p);
+ test(cb->check());
}
{
- Test::Structure si1;
- si1.p = p;
- si1.e = Test::enum3;
- si1.s.s = "abc";
- Test::Structure si2;
- si2.p = 0;
- si2.e = Test::enum2;
- si2.s.s = "def";
-
- AMI_MyClass_opStructIPtr cb = new AMI_MyClass_opStructI(communicator);
- p->opStruct_async(cb, si1, si2);
- test(cb->check());
+ Test::Structure si1;
+ si1.p = p;
+ si1.e = Test::enum3;
+ si1.s.s = "abc";
+ Test::Structure si2;
+ si2.p = 0;
+ si2.e = Test::enum2;
+ si2.s.s = "def";
+
+ AMI_MyClass_opStructIPtr cb = new AMI_MyClass_opStructI(communicator);
+ p->opStruct_async(cb, si1, si2);
+ test(cb->check());
}
{
- Test::ByteS bsi1;
- Test::ByteS bsi2;
+ Test::ByteS bsi1;
+ Test::ByteS bsi2;
- bsi1.push_back(Ice::Byte(0x01));
- bsi1.push_back(Ice::Byte(0x11));
- bsi1.push_back(Ice::Byte(0x12));
- bsi1.push_back(Ice::Byte(0x22));
+ bsi1.push_back(Ice::Byte(0x01));
+ bsi1.push_back(Ice::Byte(0x11));
+ bsi1.push_back(Ice::Byte(0x12));
+ bsi1.push_back(Ice::Byte(0x22));
- bsi2.push_back(Ice::Byte(0xf1));
- bsi2.push_back(Ice::Byte(0xf2));
- bsi2.push_back(Ice::Byte(0xf3));
- bsi2.push_back(Ice::Byte(0xf4));
+ bsi2.push_back(Ice::Byte(0xf1));
+ bsi2.push_back(Ice::Byte(0xf2));
+ bsi2.push_back(Ice::Byte(0xf3));
+ bsi2.push_back(Ice::Byte(0xf4));
- AMI_MyClass_opByteSIPtr cb = new AMI_MyClass_opByteSI;
- p->opByteS_async(cb, bsi1, bsi2);
- test(cb->check());
+ AMI_MyClass_opByteSIPtr cb = new AMI_MyClass_opByteSI;
+ p->opByteS_async(cb, bsi1, bsi2);
+ test(cb->check());
}
{
- Test::BoolS bsi1;
- Test::BoolS bsi2;
+ Test::BoolS bsi1;
+ Test::BoolS bsi2;
- bsi1.push_back(true);
- bsi1.push_back(true);
- bsi1.push_back(false);
+ bsi1.push_back(true);
+ bsi1.push_back(true);
+ bsi1.push_back(false);
- bsi2.push_back(false);
+ bsi2.push_back(false);
- AMI_MyClass_opBoolSIPtr cb = new AMI_MyClass_opBoolSI;
- p->opBoolS_async(cb, bsi1, bsi2);
- test(cb->check());
+ AMI_MyClass_opBoolSIPtr cb = new AMI_MyClass_opBoolSI;
+ p->opBoolS_async(cb, bsi1, bsi2);
+ test(cb->check());
}
{
- Test::ShortS ssi;
- Test::IntS isi;
- Test::LongS lsi;
+ Test::ShortS ssi;
+ Test::IntS isi;
+ Test::LongS lsi;
- ssi.push_back(1);
- ssi.push_back(2);
- ssi.push_back(3);
+ ssi.push_back(1);
+ ssi.push_back(2);
+ ssi.push_back(3);
- isi.push_back(5);
- isi.push_back(6);
- isi.push_back(7);
- isi.push_back(8);
+ isi.push_back(5);
+ isi.push_back(6);
+ isi.push_back(7);
+ isi.push_back(8);
- lsi.push_back(10);
- lsi.push_back(30);
- lsi.push_back(20);
+ lsi.push_back(10);
+ lsi.push_back(30);
+ lsi.push_back(20);
- AMI_MyClass_opShortIntLongSIPtr cb = new AMI_MyClass_opShortIntLongSI;
- p->opShortIntLongS_async(cb, ssi, isi, lsi);
- test(cb->check());
+ AMI_MyClass_opShortIntLongSIPtr cb = new AMI_MyClass_opShortIntLongSI;
+ p->opShortIntLongS_async(cb, ssi, isi, lsi);
+ test(cb->check());
}
{
- Test::FloatS fsi;
- Test::DoubleS dsi;
+ Test::FloatS fsi;
+ Test::DoubleS dsi;
- fsi.push_back(Ice::Float(3.14));
- fsi.push_back(Ice::Float(1.11));
+ fsi.push_back(Ice::Float(3.14));
+ fsi.push_back(Ice::Float(1.11));
- dsi.push_back(Ice::Double(1.1E10));
- dsi.push_back(Ice::Double(1.2E10));
- dsi.push_back(Ice::Double(1.3E10));
+ dsi.push_back(Ice::Double(1.1E10));
+ dsi.push_back(Ice::Double(1.2E10));
+ dsi.push_back(Ice::Double(1.3E10));
- AMI_MyClass_opFloatDoubleSIPtr cb = new AMI_MyClass_opFloatDoubleSI;
- p->opFloatDoubleS_async(cb, fsi, dsi);
- test(cb->check());
+ AMI_MyClass_opFloatDoubleSIPtr cb = new AMI_MyClass_opFloatDoubleSI;
+ p->opFloatDoubleS_async(cb, fsi, dsi);
+ test(cb->check());
}
{
- Test::StringS ssi1;
- Test::StringS ssi2;
+ Test::StringS ssi1;
+ Test::StringS ssi2;
- ssi1.push_back("abc");
- ssi1.push_back("de");
- ssi1.push_back("fghi");
+ ssi1.push_back("abc");
+ ssi1.push_back("de");
+ ssi1.push_back("fghi");
- ssi2.push_back("xyz");
+ ssi2.push_back("xyz");
- AMI_MyClass_opStringSIPtr cb = new AMI_MyClass_opStringSI;
- p->opStringS_async(cb, ssi1, ssi2);
- test(cb->check());
+ AMI_MyClass_opStringSIPtr cb = new AMI_MyClass_opStringSI;
+ p->opStringS_async(cb, ssi1, ssi2);
+ test(cb->check());
}
{
- Test::ByteSS bsi1;
- bsi1.resize(2);
- Test::ByteSS bsi2;
- bsi2.resize(2);
+ Test::ByteSS bsi1;
+ bsi1.resize(2);
+ Test::ByteSS bsi2;
+ bsi2.resize(2);
- bsi1[0].push_back(Ice::Byte(0x01));
- bsi1[0].push_back(Ice::Byte(0x11));
- bsi1[0].push_back(Ice::Byte(0x12));
- bsi1[1].push_back(Ice::Byte(0xff));
+ bsi1[0].push_back(Ice::Byte(0x01));
+ bsi1[0].push_back(Ice::Byte(0x11));
+ bsi1[0].push_back(Ice::Byte(0x12));
+ bsi1[1].push_back(Ice::Byte(0xff));
- bsi2[0].push_back(Ice::Byte(0x0e));
- bsi2[1].push_back(Ice::Byte(0xf2));
- bsi2[1].push_back(Ice::Byte(0xf1));
+ bsi2[0].push_back(Ice::Byte(0x0e));
+ bsi2[1].push_back(Ice::Byte(0xf2));
+ bsi2[1].push_back(Ice::Byte(0xf1));
- AMI_MyClass_opByteSSIPtr cb = new AMI_MyClass_opByteSSI;
- p->opByteSS_async(cb, bsi1, bsi2);
- test(cb->check());
+ AMI_MyClass_opByteSSIPtr cb = new AMI_MyClass_opByteSSI;
+ p->opByteSS_async(cb, bsi1, bsi2);
+ test(cb->check());
}
{
- Test::FloatSS fsi;
- fsi.resize(3);
- Test::DoubleSS dsi;
- dsi.resize(1);
+ Test::FloatSS fsi;
+ fsi.resize(3);
+ Test::DoubleSS dsi;
+ dsi.resize(1);
- fsi[0].push_back(Ice::Float(3.14));
- fsi[1].push_back(Ice::Float(1.11));
+ fsi[0].push_back(Ice::Float(3.14));
+ fsi[1].push_back(Ice::Float(1.11));
- dsi[0].push_back(Ice::Double(1.1E10));
- dsi[0].push_back(Ice::Double(1.2E10));
- dsi[0].push_back(Ice::Double(1.3E10));
+ dsi[0].push_back(Ice::Double(1.1E10));
+ dsi[0].push_back(Ice::Double(1.2E10));
+ dsi[0].push_back(Ice::Double(1.3E10));
- AMI_MyClass_opFloatDoubleSSIPtr cb = new AMI_MyClass_opFloatDoubleSSI;
- p->opFloatDoubleSS_async(cb, fsi, dsi);
- test(cb->check());
+ AMI_MyClass_opFloatDoubleSSIPtr cb = new AMI_MyClass_opFloatDoubleSSI;
+ p->opFloatDoubleSS_async(cb, fsi, dsi);
+ test(cb->check());
}
{
- Test::StringSS ssi1;
- ssi1.resize(2);
- Test::StringSS ssi2;
- ssi2.resize(3);
+ Test::StringSS ssi1;
+ ssi1.resize(2);
+ Test::StringSS ssi2;
+ ssi2.resize(3);
- ssi1[0].push_back("abc");
- ssi1[1].push_back("de");
- ssi1[1].push_back("fghi");
+ ssi1[0].push_back("abc");
+ ssi1[1].push_back("de");
+ ssi1[1].push_back("fghi");
- ssi2[2].push_back("xyz");
+ ssi2[2].push_back("xyz");
- AMI_MyClass_opStringSSIPtr cb = new AMI_MyClass_opStringSSI;
- p->opStringSS_async(cb, ssi1, ssi2);
- test(cb->check());
+ AMI_MyClass_opStringSSIPtr cb = new AMI_MyClass_opStringSSI;
+ p->opStringSS_async(cb, ssi1, ssi2);
+ test(cb->check());
}
{
- Test::ByteBoolD di1;
- di1[10] = true;
- di1[100] = false;
- Test::ByteBoolD di2;
- di2[10] = true;
- di2[11] = false;
- di2[101] = true;
+ Test::ByteBoolD di1;
+ di1[10] = true;
+ di1[100] = false;
+ Test::ByteBoolD di2;
+ di2[10] = true;
+ di2[11] = false;
+ di2[101] = true;
- AMI_MyClass_opByteBoolDIPtr cb = new AMI_MyClass_opByteBoolDI;
- p->opByteBoolD_async(cb, di1, di2);
- test(cb->check());
+ AMI_MyClass_opByteBoolDIPtr cb = new AMI_MyClass_opByteBoolDI;
+ p->opByteBoolD_async(cb, di1, di2);
+ test(cb->check());
}
{
- Test::ShortIntD di1;
- di1[110] = -1;
- di1[1100] = 123123;
- Test::ShortIntD di2;
- di2[110] = -1;
- di2[111] = -100;
- di2[1101] = 0;
+ Test::ShortIntD di1;
+ di1[110] = -1;
+ di1[1100] = 123123;
+ Test::ShortIntD di2;
+ di2[110] = -1;
+ di2[111] = -100;
+ di2[1101] = 0;
- AMI_MyClass_opShortIntDIPtr cb = new AMI_MyClass_opShortIntDI;
- p->opShortIntD_async(cb, di1, di2);
- test(cb->check());
+ AMI_MyClass_opShortIntDIPtr cb = new AMI_MyClass_opShortIntDI;
+ p->opShortIntD_async(cb, di1, di2);
+ test(cb->check());
}
{
- Test::LongFloatD di1;
- di1[999999110] = Ice::Float(-1.1);
- di1[999999111] = Ice::Float(123123.2);
- Test::LongFloatD di2;
- di2[999999110] = Ice::Float(-1.1);
- di2[999999120] = Ice::Float(-100.4);
- di2[999999130] = Ice::Float(0.5);
+ Test::LongFloatD di1;
+ di1[999999110] = Ice::Float(-1.1);
+ di1[999999111] = Ice::Float(123123.2);
+ Test::LongFloatD di2;
+ di2[999999110] = Ice::Float(-1.1);
+ di2[999999120] = Ice::Float(-100.4);
+ di2[999999130] = Ice::Float(0.5);
- AMI_MyClass_opLongFloatDIPtr cb = new AMI_MyClass_opLongFloatDI;
- p->opLongFloatD_async(cb, di1, di2);
- test(cb->check());
+ AMI_MyClass_opLongFloatDIPtr cb = new AMI_MyClass_opLongFloatDI;
+ p->opLongFloatD_async(cb, di1, di2);
+ test(cb->check());
}
{
- Test::StringStringD di1;
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- Test::StringStringD di2;
- di2["foo"] = "abc -1.1";
- di2["FOO"] = "abc -100.4";
- di2["BAR"] = "abc 0.5";
+ Test::StringStringD di1;
+ di1["foo"] = "abc -1.1";
+ di1["bar"] = "abc 123123.2";
+ Test::StringStringD di2;
+ di2["foo"] = "abc -1.1";
+ di2["FOO"] = "abc -100.4";
+ di2["BAR"] = "abc 0.5";
- AMI_MyClass_opStringStringDIPtr cb = new AMI_MyClass_opStringStringDI;
- p->opStringStringD_async(cb, di1, di2);
- test(cb->check());
+ AMI_MyClass_opStringStringDIPtr cb = new AMI_MyClass_opStringStringDI;
+ p->opStringStringD_async(cb, di1, di2);
+ test(cb->check());
}
{
- Test::StringMyEnumD di1;
- di1["abc"] = Test::enum1;
- di1[""] = Test::enum2;
- Test::StringMyEnumD di2;
- di2["abc"] = Test::enum1;
- di2["qwerty"] = Test::enum3;
- di2["Hello!!"] = Test::enum2;
-
- AMI_MyClass_opStringMyEnumDIPtr cb = new AMI_MyClass_opStringMyEnumDI;
- p->opStringMyEnumD_async(cb, di1, di2);
- test(cb->check());
- }
+ Test::StringMyEnumD di1;
+ di1["abc"] = Test::enum1;
+ di1[""] = Test::enum2;
+ Test::StringMyEnumD di2;
+ di2["abc"] = Test::enum1;
+ di2["qwerty"] = Test::enum3;
+ di2["Hello!!"] = Test::enum2;
+
+ AMI_MyClass_opStringMyEnumDIPtr cb = new AMI_MyClass_opStringMyEnumDI;
+ p->opStringMyEnumD_async(cb, di1, di2);
+ test(cb->check());
+ }
{
- const int lengths[] = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
-
- for(int l = 0; l != sizeof(lengths) / sizeof(*lengths); ++l)
- {
- Test::IntS s;
- for(int i = 0; i < lengths[l]; ++i)
- {
- s.push_back(i);
- }
- AMI_MyClass_opIntSIPtr cb = new AMI_MyClass_opIntSI(lengths[l]);
- p->opIntS_async(cb, s);
- test(cb->check());
- }
- }
-
- {
- Test::StringStringD ctx;
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
- {
- test(p->ice_getContext().empty());
- AMI_MyClass_opContextNotEqualIPtr cb = new AMI_MyClass_opContextNotEqualI(ctx);
- p->opContext_async(cb);
- test(cb->check());
- }
- {
- test(p->ice_getContext().empty());
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p->opContext_async(cb, ctx);
- test(cb->check());
- }
- Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
- test(p2->ice_getContext() == ctx);
- {
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p2->opContext_async(cb);
- test(cb->check());
- }
- {
- Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p2->opContext_async(cb, ctx);
- test(cb->check());
- }
-
- {
- //
- // Test that default context is obtained correctly from communicator.
- //
+ const int lengths[] = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
+
+ for(int l = 0; l != sizeof(lengths) / sizeof(*lengths); ++l)
+ {
+ Test::IntS s;
+ for(int i = 0; i < lengths[l]; ++i)
+ {
+ s.push_back(i);
+ }
+ AMI_MyClass_opIntSIPtr cb = new AMI_MyClass_opIntSI(lengths[l]);
+ p->opIntS_async(cb, s);
+ test(cb->check());
+ }
+ }
+
+ {
+ Test::StringStringD ctx;
+ ctx["one"] = "ONE";
+ ctx["two"] = "TWO";
+ ctx["three"] = "THREE";
+ {
+ test(p->ice_getContext().empty());
+ AMI_MyClass_opContextNotEqualIPtr cb = new AMI_MyClass_opContextNotEqualI(ctx);
+ p->opContext_async(cb);
+ test(cb->check());
+ }
+ {
+ test(p->ice_getContext().empty());
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
+ p->opContext_async(cb, ctx);
+ test(cb->check());
+ }
+ Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
+ test(p2->ice_getContext() == ctx);
+ {
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
+ p2->opContext_async(cb);
+ test(cb->check());
+ }
+ {
+ Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
+ p2->opContext_async(cb, ctx);
+ test(cb->check());
+ }
+
+ {
+ //
+ // Test that default context is obtained correctly from communicator.
+ //
/* DEPRECATED
- Ice::Context dflt;
- dflt["a"] = "b";
- communicator->setDefaultContext(dflt);
- {
- AMI_MyClass_opContextNotEqualIPtr cb = new AMI_MyClass_opContextNotEqualI(dflt);
- p->opContext_async(cb);
- test(cb->check());
- }
-
- Test::MyClassPrx p2 = Test::MyClassPrx::uncheckedCast(p->ice_context(Ice::Context()));
- {
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(Ice::Context());
- p2->opContext_async(cb);
- test(cb->check());
- }
-
- p2 = Test::MyClassPrx::uncheckedCast(p->ice_defaultContext());
- {
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(dflt);
- p2->opContext_async(cb);
- test(cb->check());
- }
-
- communicator->setDefaultContext(Ice::Context());
- {
- AMI_MyClass_opContextNotEqualIPtr cb = new AMI_MyClass_opContextNotEqualI(Ice::Context());
- p2->opContext_async(cb);
- test(cb->check());
- }
-
- communicator->setDefaultContext(dflt);
- Test::MyClassPrx c = Test::MyClassPrx::checkedCast(
- communicator->stringToProxy("test:default -p 12010 -t 10000"));
- {
- Ice::Context tmp;
- tmp["a"] = "b";
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
- c->opContext_async(cb);
- test(cb->check());
- }
-
- dflt["a"] = "c";
- Test::MyClassPrx c2 = Test::MyClassPrx::uncheckedCast(c->ice_context(dflt));
- {
- Ice::Context tmp;
- tmp["a"] = "c";
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
- c2->opContext_async(cb);
- test(cb->check());
- }
-
- dflt.clear();
- Test::MyClassPrx c3 = Test::MyClassPrx::uncheckedCast(c2->ice_context(dflt));
- {
- Ice::Context tmp;
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
- c3->opContext_async(cb);
- test(cb->check());
- }
-
- Test::MyClassPrx c4 = Test::MyClassPrx::uncheckedCast(c2->ice_defaultContext());
- {
- Ice::Context tmp;
- tmp["a"] = "b";
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
- c4->opContext_async(cb);
- test(cb->check());
- }
-
- dflt["a"] = "d";
- communicator->setDefaultContext(dflt);
-
- Test::MyClassPrx c5 = Test::MyClassPrx::uncheckedCast(c->ice_defaultContext());
- {
- Ice::Context tmp;
- tmp["a"] = "d";
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
- c5->opContext_async(cb);
- test(cb->check());
- }
-
- communicator->setDefaultContext(Ice::Context());
+ Ice::Context dflt;
+ dflt["a"] = "b";
+ communicator->setDefaultContext(dflt);
+ {
+ AMI_MyClass_opContextNotEqualIPtr cb = new AMI_MyClass_opContextNotEqualI(dflt);
+ p->opContext_async(cb);
+ test(cb->check());
+ }
+
+ Test::MyClassPrx p2 = Test::MyClassPrx::uncheckedCast(p->ice_context(Ice::Context()));
+ {
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(Ice::Context());
+ p2->opContext_async(cb);
+ test(cb->check());
+ }
+
+ p2 = Test::MyClassPrx::uncheckedCast(p->ice_defaultContext());
+ {
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(dflt);
+ p2->opContext_async(cb);
+ test(cb->check());
+ }
+
+ communicator->setDefaultContext(Ice::Context());
+ {
+ AMI_MyClass_opContextNotEqualIPtr cb = new AMI_MyClass_opContextNotEqualI(Ice::Context());
+ p2->opContext_async(cb);
+ test(cb->check());
+ }
+
+ communicator->setDefaultContext(dflt);
+ Test::MyClassPrx c = Test::MyClassPrx::checkedCast(
+ communicator->stringToProxy("test:default -p 12010 -t 10000"));
+ {
+ Ice::Context tmp;
+ tmp["a"] = "b";
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
+ c->opContext_async(cb);
+ test(cb->check());
+ }
+
+ dflt["a"] = "c";
+ Test::MyClassPrx c2 = Test::MyClassPrx::uncheckedCast(c->ice_context(dflt));
+ {
+ Ice::Context tmp;
+ tmp["a"] = "c";
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
+ c2->opContext_async(cb);
+ test(cb->check());
+ }
+
+ dflt.clear();
+ Test::MyClassPrx c3 = Test::MyClassPrx::uncheckedCast(c2->ice_context(dflt));
+ {
+ Ice::Context tmp;
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
+ c3->opContext_async(cb);
+ test(cb->check());
+ }
+
+ Test::MyClassPrx c4 = Test::MyClassPrx::uncheckedCast(c2->ice_defaultContext());
+ {
+ Ice::Context tmp;
+ tmp["a"] = "b";
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
+ c4->opContext_async(cb);
+ test(cb->check());
+ }
+
+ dflt["a"] = "d";
+ communicator->setDefaultContext(dflt);
+
+ Test::MyClassPrx c5 = Test::MyClassPrx::uncheckedCast(c->ice_defaultContext());
+ {
+ Ice::Context tmp;
+ tmp["a"] = "d";
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(tmp);
+ c5->opContext_async(cb);
+ test(cb->check());
+ }
+
+ communicator->setDefaultContext(Ice::Context());
*/
- }
-
- {
- //
- // Test implicit context propagation
- //
-
- string impls[] = {"Shared", "SharedWithoutLocking", "PerThread"};
- for(int i = 0; i < 3; i++)
- {
- Ice::InitializationData initData;
- initData.properties = communicator->getProperties()->clone();
- initData.properties->setProperty("Ice.ImplicitContext", impls[i]);
-
- Ice::CommunicatorPtr ic = Ice::initialize(initData);
-
- Ice::Context ctx;
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
-
-
- Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(
- ic->stringToProxy("test:default -p 12010 -t 10000"));
-
-
- ic->getImplicitContext()->setContext(ctx);
- test(ic->getImplicitContext()->getContext() == ctx);
- {
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p->opContext_async(cb);
- test(cb->check());
- }
-
- ic->getImplicitContext()->set("zero", "ZERO");
- test(ic->getImplicitContext()->get("zero") == "ZERO");
- test(ic->getImplicitContext()->getWithDefault("foobar", "foo") == "foo");
-
- ctx = ic->getImplicitContext()->getContext();
- {
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p->opContext_async(cb);
- test(cb->check());
- }
-
- Ice::Context prxContext;
- prxContext["one"] = "UN";
- prxContext["four"] = "QUATRE";
-
- Ice::Context combined = prxContext;
- combined.insert(ctx.begin(), ctx.end());
- test(combined["one"] == "UN");
-
- p = Test::MyClassPrx::uncheckedCast(p->ice_context(prxContext));
-
- ic->getImplicitContext()->setContext(Ice::Context());
- {
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(prxContext);
- p->opContext_async(cb);
- test(cb->check());
- }
-
- ic->getImplicitContext()->setContext(ctx);
- {
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(combined);
- p->opContext_async(cb);
- test(cb->check());
- }
-
- ic->destroy();
- }
- }
+ }
+
+ {
+ //
+ // Test implicit context propagation
+ //
+
+ string impls[] = {"Shared", "SharedWithoutLocking", "PerThread"};
+ for(int i = 0; i < 3; i++)
+ {
+ Ice::InitializationData initData;
+ initData.properties = communicator->getProperties()->clone();
+ initData.properties->setProperty("Ice.ImplicitContext", impls[i]);
+
+ Ice::CommunicatorPtr ic = Ice::initialize(initData);
+
+ Ice::Context ctx;
+ ctx["one"] = "ONE";
+ ctx["two"] = "TWO";
+ ctx["three"] = "THREE";
+
+
+ Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(
+ ic->stringToProxy("test:default -p 12010 -t 10000"));
+
+
+ ic->getImplicitContext()->setContext(ctx);
+ test(ic->getImplicitContext()->getContext() == ctx);
+ {
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
+ p->opContext_async(cb);
+ test(cb->check());
+ }
+
+ ic->getImplicitContext()->set("zero", "ZERO");
+ test(ic->getImplicitContext()->get("zero") == "ZERO");
+ test(ic->getImplicitContext()->getWithDefault("foobar", "foo") == "foo");
+
+ ctx = ic->getImplicitContext()->getContext();
+ {
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
+ p->opContext_async(cb);
+ test(cb->check());
+ }
+
+ Ice::Context prxContext;
+ prxContext["one"] = "UN";
+ prxContext["four"] = "QUATRE";
+
+ Ice::Context combined = prxContext;
+ combined.insert(ctx.begin(), ctx.end());
+ test(combined["one"] == "UN");
+
+ p = Test::MyClassPrx::uncheckedCast(p->ice_context(prxContext));
+
+ ic->getImplicitContext()->setContext(Ice::Context());
+ {
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(prxContext);
+ p->opContext_async(cb);
+ test(cb->check());
+ }
+
+ ic->getImplicitContext()->setContext(ctx);
+ {
+ AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(combined);
+ p->opContext_async(cb);
+ test(cb->check());
+ }
+
+ ic->destroy();
+ }
+ }
}
{
Ice::Double d = 1278312346.0 / 13.0;
- Test::DoubleS ds(5, d);
- AMI_MyClass_opDoubleMarshalingIPtr cb = new AMI_MyClass_opDoubleMarshalingI;
- p->opDoubleMarshaling_async(cb, d, ds);
- test(cb->check());
+ Test::DoubleS ds(5, d);
+ AMI_MyClass_opDoubleMarshalingIPtr cb = new AMI_MyClass_opDoubleMarshalingI;
+ p->opDoubleMarshaling_async(cb, d, ds);
+ test(cb->check());
}
{
- Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(p);
- test(derived);
- AMI_MyDerivedClass_opDerivedIPtr cb = new AMI_MyDerivedClass_opDerivedI;
- derived->opDerived_async(cb);
- test(cb->check());
+ Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(p);
+ test(derived);
+ AMI_MyDerivedClass_opDerivedIPtr cb = new AMI_MyDerivedClass_opDerivedI;
+ derived->opDerived_async(cb);
+ test(cb->check());
}
}