diff options
author | Jose <jose@zeroc.com> | 2019-06-07 11:33:31 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-06-07 11:33:31 +0200 |
commit | 7d9486b9113d5bbb533ced14d4e145faf97dcda2 (patch) | |
tree | 6c7899e633ddf97c03df49156b1483b23010da3b /objective-c | |
parent | Fix code format fixes (diff) | |
parent | JavaScript browser testing fixes (diff) | |
download | ice-7d9486b9113d5bbb533ced14d4e145faf97dcda2.tar.bz2 ice-7d9486b9113d5bbb533ced14d4e145faf97dcda2.tar.xz ice-7d9486b9113d5bbb533ced14d4e145faf97dcda2.zip |
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'objective-c')
-rw-r--r-- | objective-c/test/Ice/operations/AllTests.m | 8 | ||||
-rw-r--r-- | objective-c/test/Ice/operations/Collocated.m | 1 | ||||
-rw-r--r-- | objective-c/test/Ice/operations/OperationsTest.ice | 27 | ||||
-rw-r--r-- | objective-c/test/Ice/operations/Server.m | 1 | ||||
-rw-r--r-- | objective-c/test/Ice/operations/TestI.h | 5 | ||||
-rw-r--r-- | objective-c/test/Ice/operations/TestI.m | 14 | ||||
-rw-r--r-- | objective-c/test/Ice/operations/Twoways.m | 7 |
7 files changed, 59 insertions, 4 deletions
diff --git a/objective-c/test/Ice/operations/AllTests.m b/objective-c/test/Ice/operations/AllTests.m index 9a11a26fb63..52613b2e068 100644 --- a/objective-c/test/Ice/operations/AllTests.m +++ b/objective-c/test/Ice/operations/AllTests.m @@ -13,11 +13,13 @@ operationsAllTests(id<ICECommunicator> communicator) id<ICEObjectPrx> base = [communicator stringToProxy:(ref)]; id<TestOperationsMyClassPrx> cl = [TestOperationsMyClassPrx checkedCast:base]; id<TestOperationsMyDerivedClassPrx> derived = [TestOperationsMyDerivedClassPrx checkedCast:cl]; + id<TestOperationsMBPrx> bprx = + [TestOperationsMBPrx checkedCast:[communicator stringToProxy: @"b:default -p 12010"]]; tprintf("testing twoway operations... "); - void twoways(id<ICECommunicator>, id<TestOperationsMyClassPrx>); - twoways(communicator, cl); - twoways(communicator, derived); + void twoways(id<ICECommunicator>, id<TestOperationsMyClassPrx>, id<TestOperationsMBPrx>); + twoways(communicator, cl, bprx); + twoways(communicator, derived, bprx); [derived opDerived]; tprintf("ok\n"); diff --git a/objective-c/test/Ice/operations/Collocated.m b/objective-c/test/Ice/operations/Collocated.m index d4c66690c47..0de36c20a52 100644 --- a/objective-c/test/Ice/operations/Collocated.m +++ b/objective-c/test/Ice/operations/Collocated.m @@ -13,6 +13,7 @@ run(id<ICECommunicator> communicator) id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestOperationsAdapter"]; id<ICEObjectPrx> prx = [adapter add:[TestOperationsMyDerivedClassI myDerivedClass] identity:[ICEUtil stringToIdentity:@"test"]]; + [adapter add:[TestOperationsBI b] identity:[ICEUtil stringToIdentity:@"b"]]; //[adapter activate]; // Don't activate OA to ensure collocation is used. test(![prx ice_getConnection]); diff --git a/objective-c/test/Ice/operations/OperationsTest.ice b/objective-c/test/Ice/operations/OperationsTest.ice index 7e5ddbce33b..7ec74544070 100644 --- a/objective-c/test/Ice/operations/OperationsTest.ice +++ b/objective-c/test/Ice/operations/OperationsTest.ice @@ -6,6 +6,8 @@ #include <Ice/Current.ice> +[["suppress-warning:deprecated"]] // For classes with operations + ["objc:prefix:TestOperations"] module Test { @@ -406,3 +408,28 @@ interface MyDerivedClass extends Test::MyClass } } + +["objc:prefix:TestOperationsM"] + +// +// Test proxy inheritance for class with operations +// see: https://github.com/zeroc-ice/ice/issues/406 +// +module M +{ + class A + { + int x; + // void opA(); + } + + interface Intf + { + void opIntf(); + } + + class B extends A implements Intf + { + void opB(); + } +} diff --git a/objective-c/test/Ice/operations/Server.m b/objective-c/test/Ice/operations/Server.m index d4baa538ba0..c8f1712c56f 100644 --- a/objective-c/test/Ice/operations/Server.m +++ b/objective-c/test/Ice/operations/Server.m @@ -13,6 +13,7 @@ run(id<ICECommunicator> communicator) id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestOperationsAdapter"]; [adapter add:[TestOperationsMyDerivedClassI myDerivedClass] identity:[ICEUtil stringToIdentity:@"test"]]; + [adapter add:[TestOperationsBI b] identity:[ICEUtil stringToIdentity:@"b"]]; [adapter activate]; serverReady(communicator); diff --git a/objective-c/test/Ice/operations/TestI.h b/objective-c/test/Ice/operations/TestI.h index 2609c1bb03f..8d58a95fad2 100644 --- a/objective-c/test/Ice/operations/TestI.h +++ b/objective-c/test/Ice/operations/TestI.h @@ -14,3 +14,8 @@ NSCondition* _cond; } @end + +@interface TestOperationsBI : TestOperationsMB<TestOperationsMB> +{ +} +@end diff --git a/objective-c/test/Ice/operations/TestI.m b/objective-c/test/Ice/operations/TestI.m index 8c279ee4069..a61bf84f388 100644 --- a/objective-c/test/Ice/operations/TestI.m +++ b/objective-c/test/Ice/operations/TestI.m @@ -854,3 +854,17 @@ return YES; } @end + + + +@implementation TestOperationsBI + +-(void) opB:(ICECurrent*)__unused current +{ +} + +-(void) opIntf:(ICECurrent*)__unused current +{ +} + +@end diff --git a/objective-c/test/Ice/operations/Twoways.m b/objective-c/test/Ice/operations/Twoways.m index 8c4177e7551..8cc9825a59a 100644 --- a/objective-c/test/Ice/operations/Twoways.m +++ b/objective-c/test/Ice/operations/Twoways.m @@ -73,7 +73,7 @@ @end void -twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p) +twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p, id<TestOperationsMBPrx> bprx) { { TestOperationsStringS *literals = [p opStringLiterals]; @@ -1908,4 +1908,9 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p) { // Client is talking to non-Objective-C server. } + + { + [bprx opB]; + [bprx opIntf]; + } } |