diff options
author | Jose <jose@zeroc.com> | 2015-06-16 18:29:26 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-06-16 18:29:26 +0200 |
commit | 5e63cae8b449f7927d7c0669bf236bf5fd8396c0 (patch) | |
tree | c464366dad2bbd10fceca0bc34845df25eda5321 /objective-c/test | |
parent | Fixed ICE-6602: optionals marshaling bug (diff) | |
download | ice-5e63cae8b449f7927d7c0669bf236bf5fd8396c0.tar.bz2 ice-5e63cae8b449f7927d7c0669bf236bf5fd8396c0.tar.xz ice-5e63cae8b449f7927d7c0669bf236bf5fd8396c0.zip |
objetive-c optional test updates
Diffstat (limited to 'objective-c/test')
-rw-r--r-- | objective-c/test/Ice/optional/AllTests.m | 12 | ||||
-rw-r--r-- | objective-c/test/Ice/optional/OptionalTest.ice | 20 | ||||
-rw-r--r-- | objective-c/test/Ice/optional/TestI.m | 5 |
3 files changed, 37 insertions, 0 deletions
diff --git a/objective-c/test/Ice/optional/AllTests.m b/objective-c/test/Ice/optional/AllTests.m index 83fd2ca0bc3..8e26cfeb270 100644 --- a/objective-c/test/Ice/optional/AllTests.m +++ b/objective-c/test/Ice/optional/AllTests.m @@ -625,6 +625,18 @@ optionalAllTests(id<ICECommunicator> communicator) [[initial ice_encodingVersion:ICEEncoding_1_0] returnOptionalClass:YES o:&oo]; test(oo == ICENone); + TestOptionalG* g = [TestOptionalG g]; + g.gg1 = [TestOptionalG1 g1:@"g1"]; + g.gg1Opt = [TestOptionalG1 g1:@"g1opt"]; + g.gg2 = [TestOptionalG2 g2:10]; + g.gg2Opt = [TestOptionalG2 g2:20]; + TestOptionalG* r = [initial opG:g]; + + test([r.gg1.a isEqualToString:@"g1"]); + test([r.gg1Opt.a isEqualToString:@"g1opt"]); + test(r.gg2.a == 10); + test(r.gg2Opt.a == 20); + tprintf("ok\n"); tprintf("testing marshalling of large containers with fixed size elements..."); diff --git a/objective-c/test/Ice/optional/OptionalTest.ice b/objective-c/test/Ice/optional/OptionalTest.ice index 624b5860673..4a398389a30 100644 --- a/objective-c/test/Ice/optional/OptionalTest.ice +++ b/objective-c/test/Ice/optional/OptionalTest.ice @@ -174,6 +174,24 @@ class F extends E optional(1) A af; }; +class G1 +{ + string a; +}; + +class G2 +{ + long a; +}; + +class G +{ + optional(1) G1 gg1Opt; + G2 gg2; + optional(0) G2 gg2Opt; + G1 gg1; +}; + class Recursive; sequence<Recursive> RecursiveSeq; @@ -276,6 +294,8 @@ class Initial void returnOptionalClass(bool req, out optional(1) OneOptional o); + G opG(G g); + bool supportsRequiredParams(); bool supportsJavaSerializable(); diff --git a/objective-c/test/Ice/optional/TestI.m b/objective-c/test/Ice/optional/TestI.m index 2139322e270..2efe3c1a521 100644 --- a/objective-c/test/Ice/optional/TestI.m +++ b/objective-c/test/Ice/optional/TestI.m @@ -223,6 +223,11 @@ { *o = [TestOptionalOneOptional oneOptional:@53]; } +-(id) opG:(id)g current:(ICECurrent*)current +{ + return g; +} + -(BOOL) supportsRequiredParams:(ICECurrent*)current { return NO; |