diff options
author | Marc Laukien <marc@zeroc.com> | 2001-09-09 20:59:53 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-09-09 20:59:53 +0000 |
commit | 7b34e5474383bb5870c4af6f29997f7df9482d4c (patch) | |
tree | 617267dd108f2d9a008b77a9ec08382386f67b92 /cpp/test | |
parent | fixes (diff) | |
download | ice-7b34e5474383bb5870c4af6f29997f7df9482d4c.tar.bz2 ice-7b34e5474383bb5870c4af6f29997f7df9482d4c.tar.xz ice-7b34e5474383bb5870c4af6f29997f7df9482d4c.zip |
completed structs; parser visitor changes
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/Ice/operations/Exceptions.cpp | 61 | ||||
-rw-r--r-- | cpp/test/Ice/operations/Test.ice | 16 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TestI.cpp | 65 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TestI.h | 3 | ||||
-rw-r--r-- | cpp/test/Ice/operations/Twoways.cpp | 395 |
5 files changed, 305 insertions, 235 deletions
diff --git a/cpp/test/Ice/operations/Exceptions.cpp b/cpp/test/Ice/operations/Exceptions.cpp index 729816dcb8f..3a364d6b72e 100644 --- a/cpp/test/Ice/operations/Exceptions.cpp +++ b/cpp/test/Ice/operations/Exceptions.cpp @@ -114,6 +114,19 @@ exceptions(Test::MyClassPrx p) p->opEx(10); test(false); } + catch(const Test::Struct& ex) + { + test(ex.p == p); + test(ex.e == Test::enum2); + test(ex.s.s == "xxx"); + ex.p->opVoid(); + } + + try + { + p->opEx(11); + test(false); + } catch(const Test::ByteS& ex) { test(ex.size() == 2); @@ -123,7 +136,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(11); + p->opEx(12); test(false); } catch(const Test::BoolS& ex) @@ -135,7 +148,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(12); + p->opEx(13); test(false); } catch(const Test::ShortS& ex) @@ -147,7 +160,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(13); + p->opEx(14); test(false); } catch(const Test::IntS& ex) @@ -159,7 +172,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(14); + p->opEx(15); test(false); } catch(const Test::LongS& ex) @@ -171,7 +184,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(15); + p->opEx(16); test(false); } catch(const Test::FloatS& ex) @@ -183,7 +196,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(16); + p->opEx(17); test(false); } catch(const Test::DoubleS& ex) @@ -195,7 +208,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(17); + p->opEx(18); test(false); } catch(const Test::StringS& ex) @@ -207,7 +220,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(18); + p->opEx(19); test(false); } catch(const Test::WStringS& ex) @@ -219,7 +232,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(19); + p->opEx(20); test(false); } catch(const Test::ByteSS& ex) @@ -234,7 +247,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(20); + p->opEx(21); test(false); } catch(const Test::BoolSS& ex) @@ -249,7 +262,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(21); + p->opEx(22); test(false); } catch(const Test::ShortSS& ex) @@ -264,7 +277,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(22); + p->opEx(23); test(false); } catch(const Test::IntSS& ex) @@ -279,7 +292,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(23); + p->opEx(24); test(false); } catch(const Test::LongSS& ex) @@ -294,7 +307,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(24); + p->opEx(25); test(false); } catch(const Test::FloatSS& ex) @@ -309,7 +322,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(25); + p->opEx(26); test(false); } catch(const Test::DoubleSS& ex) @@ -324,7 +337,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(26); + p->opEx(27); test(false); } catch(const Test::StringSS& ex) @@ -339,7 +352,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(27); + p->opEx(28); test(false); } catch(const Test::WStringSS& ex) @@ -354,7 +367,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(28); + p->opEx(29); test(false); } catch(const Test::ByteBoolD& ex) @@ -368,7 +381,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(29); + p->opEx(30); test(false); } catch(const Test::ShortIntD& ex) @@ -384,7 +397,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(30); + p->opEx(31); test(false); } catch(const Test::LongFloatD& ex) @@ -396,7 +409,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(31); + p->opEx(32); test(false); } catch(const Test::DoubleStringD& ex) @@ -412,7 +425,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(32); + p->opEx(33); test(false); } catch(const Test::WStringMyEnumD& ex) @@ -424,7 +437,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(33); + p->opEx(34); test(false); } catch(const Test::MyClassStringD& ex) @@ -454,7 +467,7 @@ exceptions(Test::MyClassPrx p) try { - p->opEx(34); + p->opEx(35); test(false); } catch(const Test::MyClassPrxE& ex) diff --git a/cpp/test/Ice/operations/Test.ice b/cpp/test/Ice/operations/Test.ice index 5df831053ab..788ac1da67f 100644 --- a/cpp/test/Ice/operations/Test.ice +++ b/cpp/test/Ice/operations/Test.ice @@ -23,6 +23,18 @@ enum MyEnum class MyClass; +struct AnotherStruct +{ + string s; +}; + +struct Struct +{ + MyClass* p; + MyEnum e; + AnotherStruct s; +}; + sequence<byte> ByteS; sequence<bool> BoolS; sequence<short> ShortS; @@ -82,6 +94,9 @@ class MyClass MyClass* opMyClass(MyClass* p1; MyClass* p2); + Struct opStruct(Struct p1, Struct p2; + Struct p3); + ByteS opByteS(ByteS p1, ByteS p2; ByteS p3); @@ -147,6 +162,7 @@ class MyClass double, string, wstring, + Struct, ByteS, BoolS, ShortS, diff --git a/cpp/test/Ice/operations/TestI.cpp b/cpp/test/Ice/operations/TestI.cpp index 13e4e1fb9a9..ad5b9ca2044 100644 --- a/cpp/test/Ice/operations/TestI.cpp +++ b/cpp/test/Ice/operations/TestI.cpp @@ -104,6 +104,14 @@ MyDerivedClassI::opMyClass(const Test::MyClassPrx& p1, return Test::MyClassPrx::uncheckedCast(_adapter->objectToProxy(this)); } +Test::Struct +MyDerivedClassI::opStruct(const Test::Struct& p1, const ::Test::Struct& p2, ::Test::Struct& p3) +{ + p3 = p1; + p3.s.s = "a new string"; + return p2; +} + Test::ByteS MyDerivedClassI::opByteS(const Test::ByteS& p1, const Test::ByteS& p2, @@ -386,13 +394,22 @@ MyDerivedClassI::opEx(Ice::Int p) case 10: { + Test::Struct ex; + ex.p = Test::MyClassPrx::uncheckedCast(_adapter->objectToProxy(this)); + ex.e = Test::enum2; + ex.s.s = "xxx"; + throw ex; + } + + case 11: + { Test::ByteS ex; ex.push_back(Ice::Byte(0x0f)); ex.push_back(Ice::Byte(0xf0)); throw ex; } - case 11: + case 12: { Test::BoolS ex; ex.push_back(true); @@ -400,7 +417,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 12: + case 13: { Test::ShortS ex; ex.push_back(1); @@ -408,7 +425,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 13: + case 14: { Test::IntS ex; ex.push_back(3); @@ -416,7 +433,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 14: + case 15: { Test::LongS ex; ex.push_back(5); @@ -424,7 +441,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 15: + case 16: { Test::FloatS ex; ex.push_back(Ice::Float(7.7)); @@ -432,7 +449,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 16: + case 17: { Test::DoubleS ex; ex.push_back(Ice::Double(9.9)); @@ -440,7 +457,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 17: + case 18: { Test::StringS ex; ex.push_back("abc"); @@ -448,7 +465,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 18: + case 19: { Test::WStringS ex; ex.push_back(L"xxx"); @@ -456,7 +473,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 19: + case 20: { Test::ByteS v1; Test::ByteS v2; @@ -469,7 +486,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 20: + case 21: { Test::BoolS v1; Test::BoolS v2; @@ -482,7 +499,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 21: + case 22: { Test::ShortS v1; Test::ShortS v2; @@ -495,7 +512,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 22: + case 23: { Test::IntS v1; Test::IntS v2; @@ -508,7 +525,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 23: + case 24: { Test::LongS v1; Test::LongS v2; @@ -521,7 +538,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 24: + case 25: { Test::FloatS v1; Test::FloatS v2; @@ -534,7 +551,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 25: + case 26: { Test::DoubleS v1; Test::DoubleS v2; @@ -547,7 +564,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 26: + case 27: { Test::StringS v1; Test::StringS v2; @@ -560,7 +577,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 27: + case 28: { Test::WStringS v1; Test::WStringS v2; @@ -573,7 +590,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 28: + case 29: { Test::ByteBoolD ex; ex[0] = true; @@ -581,7 +598,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 29: + case 30: { Test::ShortIntD ex; ex[-10] = 10; @@ -590,14 +607,14 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 30: + case 31: { Test::LongFloatD ex; ex[0x7fffffffffffffff] = Ice::Float(3.14); throw ex; } - case 31: + case 32: { Test::DoubleStringD ex; ex[-10.1E1] = "abc"; @@ -606,14 +623,14 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 32: + case 33: { Test::WStringMyEnumD ex; ex[L"Hello"] = Test::enum2; throw ex; } - case 33: + case 34: { Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(_adapter->objectToProxy(this)); Test::MyClassStringD ex; @@ -622,7 +639,7 @@ MyDerivedClassI::opEx(Ice::Int p) throw ex; } - case 34: + case 35: { Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(_adapter->objectToProxy(this)); p->_throw(); diff --git a/cpp/test/Ice/operations/TestI.h b/cpp/test/Ice/operations/TestI.h index 62e8f9e9aa7..2295ddf36a8 100644 --- a/cpp/test/Ice/operations/TestI.h +++ b/cpp/test/Ice/operations/TestI.h @@ -57,6 +57,9 @@ public: virtual Test::MyClassPrx opMyClass(const Test::MyClassPrx&, Test::MyClassPrx&); + virtual Test::Struct opStruct(const Test::Struct&, const Test::Struct&, + Test::Struct&); + virtual Test::ByteS opByteS(const Test::ByteS&, const Test::ByteS&, Test::ByteS&); diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index 8d26b5494cf..eda7ed90c66 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -142,6 +142,27 @@ twoways(Test::MyClassPrx p) } { + Test::Struct si1; + si1.p = p; + si1.e = Test::enum3; + si1.s.s = "abc"; + Test::Struct si2; + si2.p = 0; + si2.e = Test::enum2; + si2.s.s = "def"; + + Test::Struct so; + Test::Struct 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; @@ -155,24 +176,24 @@ twoways(Test::MyClassPrx p) bsi2.push_back(Ice::Byte(0xf3)); bsi2.push_back(Ice::Byte(0xf4)); - Test::ByteS bvo; - Test::ByteS rvo; - - rvo = p->opByteS(bsi1, bsi2, bvo); - test(bvo.size() == 4); - test(bvo[0] == Ice::Byte(0x22)); - test(bvo[1] == Ice::Byte(0x12)); - test(bvo[2] == Ice::Byte(0x11)); - test(bvo[3] == Ice::Byte(0x01)); - test(rvo.size() == 8); - test(rvo[0] == Ice::Byte(0x01)); - test(rvo[1] == Ice::Byte(0x11)); - test(rvo[2] == Ice::Byte(0x12)); - test(rvo[3] == Ice::Byte(0x22)); - test(rvo[4] == Ice::Byte(0xf1)); - test(rvo[5] == Ice::Byte(0xf2)); - test(rvo[6] == Ice::Byte(0xf3)); - test(rvo[7] == 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)); } { @@ -185,19 +206,19 @@ twoways(Test::MyClassPrx p) bsi2.push_back(false); - Test::BoolS bvo; - Test::BoolS rvo; - - rvo = p->opBoolS(bsi1, bsi2, bvo); - test(bvo.size() == 4); - test(bvo[0]); - test(bvo[1]); - test(!bvo[2]); - test(!bvo[3]); - test(rvo.size() == 3); - test(!rvo[0]); - test(rvo[1]); - test(rvo[2]); + 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]); } { @@ -218,32 +239,32 @@ twoways(Test::MyClassPrx p) lsi.push_back(30); lsi.push_back(20); - Test::ShortS svo; - Test::IntS ivo; - Test::LongS lvo; - Test::LongS rvo; - - rvo = p->opShortIntLongS(ssi, isi, lsi, svo, ivo, lvo); - test(svo.size() == 3); - test(svo[0] == 1); - test(svo[1] == 2); - test(svo[2] == 3); - test(ivo.size() == 4); - test(ivo[0] == 8); - test(ivo[1] == 7); - test(ivo[2] == 6); - test(ivo[3] == 5); - test(lvo.size() == 6); - test(lvo[0] == 10); - test(lvo[1] == 30); - test(lvo[2] == 20); - test(lvo[3] == 10); - test(lvo[4] == 30); - test(lvo[5] == 20); - test(rvo.size() == 3); - test(rvo[0] == 10); - test(rvo[1] == 30); - test(rvo[2] == 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); } { @@ -257,24 +278,24 @@ twoways(Test::MyClassPrx p) dsi.push_back(Ice::Double(1.2E10)); dsi.push_back(Ice::Double(1.3E10)); - Test::FloatS fvo; - Test::DoubleS dvo; - Test::DoubleS rvo; - - rvo = p->opFloatDoubleS(fsi, dsi, fvo, dvo); - test(fvo.size() == 2); - test(fvo[0] == ::Ice::Float(3.14)); - test(fvo[1] == ::Ice::Float(1.11)); - test(dvo.size() == 3); - test(dvo[0] == ::Ice::Double(1.3E10)); - test(dvo[1] == ::Ice::Double(1.2E10)); - test(dvo[2] == ::Ice::Double(1.1E10)); - test(rvo.size() == 5); - test(rvo[0] == ::Ice::Double(1.1E10)); - test(rvo[1] == ::Ice::Double(1.2E10)); - test(rvo[2] == ::Ice::Double(1.3E10)); - test(::Ice::Float(rvo[3]) == ::Ice::Float(3.14)); - test(::Ice::Float(rvo[4]) == ::Ice::Float(1.11)); + 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)); } { @@ -287,19 +308,19 @@ twoways(Test::MyClassPrx p) ssi2.push_back("xyz"); - Test::StringS svo; - Test::StringS rvo; - - rvo = p->opStringS(ssi1, ssi2, svo); - test(svo.size() == 4); - test(svo[0] == "abc"); - test(svo[1] == "de"); - test(svo[2] == "fghi"); - test(svo[3] == "xyz"); - test(rvo.size() == 3); - test(rvo[0] == "fghi"); - test(rvo[1] == "de"); - test(rvo[2] == "abc"); + 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"); } { @@ -312,19 +333,19 @@ twoways(Test::MyClassPrx p) ssi2.push_back(L"xyz"); - Test::WStringS svo; - Test::WStringS rvo; - - rvo = p->opWStringS(ssi1, ssi2, svo); - test(svo.size() == 4); - test(svo[0] == L"abc"); - test(svo[1] == L"de"); - test(svo[2] == L"fghi"); - test(svo[3] == L"xyz"); - test(rvo.size() == 3); - test(rvo[0] == L"fghi"); - test(rvo[1] == L"de"); - test(rvo[2] == L"abc"); + Test::WStringS sso; + Test::WStringS rso; + + rso = p->opWStringS(ssi1, ssi2, sso); + test(sso.size() == 4); + test(sso[0] == L"abc"); + test(sso[1] == L"de"); + test(sso[2] == L"fghi"); + test(sso[3] == L"xyz"); + test(rso.size() == 3); + test(rso[0] == L"fghi"); + test(rso[1] == L"de"); + test(rso[2] == L"abc"); } { @@ -342,29 +363,29 @@ twoways(Test::MyClassPrx p) bsi2[1].push_back(Ice::Byte(0xf2)); bsi2[1].push_back(Ice::Byte(0xf1)); - Test::ByteSS bvo; - Test::ByteSS rvo; - - rvo = p->opByteSS(bsi1, bsi2, bvo); - test(bvo.size() == 2); - test(bvo[0].size() == 1); - test(bvo[0][0] == Ice::Byte(0xff)); - test(bvo[1].size() == 3); - test(bvo[1][0] == Ice::Byte(0x01)); - test(bvo[1][1] == Ice::Byte(0x11)); - test(bvo[1][2] == Ice::Byte(0x12)); - test(rvo.size() == 4); - test(rvo[0].size() == 3); - test(rvo[0][0] == Ice::Byte(0x01)); - test(rvo[0][1] == Ice::Byte(0x11)); - test(rvo[0][2] == Ice::Byte(0x12)); - test(rvo[1].size() == 1); - test(rvo[1][0] == Ice::Byte(0xff)); - test(rvo[2].size() == 1); - test(rvo[2][0] == Ice::Byte(0x0e)); - test(rvo[3].size() == 2); - test(rvo[3][0] == Ice::Byte(0xf2)); - test(rvo[3][1] == 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)); } { @@ -380,31 +401,31 @@ twoways(Test::MyClassPrx p) dsi[0].push_back(Ice::Double(1.2E10)); dsi[0].push_back(Ice::Double(1.3E10)); - Test::FloatSS fvo; - Test::DoubleSS dvo; - Test::DoubleSS rvo; - - rvo = p->opFloatDoubleSS(fsi, dsi, fvo, dvo); - test(fvo.size() == 3); - test(fvo[0].size() == 1); - test(fvo[0][0] == ::Ice::Float(3.14)); - test(fvo[1].size() == 1); - test(fvo[1][0] == ::Ice::Float(1.11)); - test(fvo[2].size() == 0); - test(dvo.size() == 1); - test(dvo[0].size() == 3); - test(dvo[0][0] == ::Ice::Double(1.1E10)); - test(dvo[0][1] == ::Ice::Double(1.2E10)); - test(dvo[0][2] == ::Ice::Double(1.3E10)); - test(rvo.size() == 2); - test(rvo[0].size() == 3); - test(rvo[0][0] == ::Ice::Double(1.1E10)); - test(rvo[0][1] == ::Ice::Double(1.2E10)); - test(rvo[0][2] == ::Ice::Double(1.3E10)); - test(rvo[1].size() == 3); - test(rvo[1][0] == ::Ice::Double(1.1E10)); - test(rvo[1][1] == ::Ice::Double(1.2E10)); - test(rvo[1][2] == ::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)); } { @@ -419,25 +440,25 @@ twoways(Test::MyClassPrx p) ssi2[2].push_back("xyz"); - Test::StringSS svo; - Test::StringSS rvo; - - rvo = p->opStringSS(ssi1, ssi2, svo); - test(svo.size() == 5); - test(svo[0].size() == 1); - test(svo[0][0] == "abc"); - test(svo[1].size() == 2); - test(svo[1][0] == "de"); - test(svo[1][1] == "fghi"); - test(svo[2].size() == 0); - test(svo[3].size() == 0); - test(svo[4].size() == 1); - test(svo[4][0] == "xyz"); - test(rvo.size() == 3); - test(rvo[0].size() == 1); - test(rvo[0][0] == "xyz"); - test(rvo[1].size() == 0); - test(rvo[2].size() == 0); + 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); } { @@ -452,25 +473,25 @@ twoways(Test::MyClassPrx p) ssi2[2].push_back(L"xyz"); - Test::WStringSS svo; - Test::WStringSS rvo; - - rvo = p->opWStringSS(ssi1, ssi2, svo); - test(svo.size() == 5); - test(svo[0].size() == 1); - test(svo[0][0] == L"abc"); - test(svo[1].size() == 2); - test(svo[1][0] == L"de"); - test(svo[1][1] == L"fghi"); - test(svo[2].size() == 0); - test(svo[3].size() == 0); - test(svo[4].size() == 1); - test(svo[4][0] == L"xyz"); - test(rvo.size() == 3); - test(rvo[0].size() == 1); - test(rvo[0][0] == L"xyz"); - test(rvo[1].size() == 0); - test(rvo[2].size() == 0); + Test::WStringSS sso; + Test::WStringSS rso; + + rso = p->opWStringSS(ssi1, ssi2, sso); + test(sso.size() == 5); + test(sso[0].size() == 1); + test(sso[0][0] == L"abc"); + test(sso[1].size() == 2); + test(sso[1][0] == L"de"); + test(sso[1][1] == L"fghi"); + test(sso[2].size() == 0); + test(sso[3].size() == 0); + test(sso[4].size() == 1); + test(sso[4][0] == L"xyz"); + test(rso.size() == 3); + test(rso[0].size() == 1); + test(rso[0][0] == L"xyz"); + test(rso[1].size() == 0); + test(rso[2].size() == 0); } { |