summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-09-03 16:44:36 +0200
committerJose <jose@zeroc.com>2019-09-03 16:44:36 +0200
commit860cd6940fc075f1b30d07b138f410d230ac0e14 (patch)
tree93c0c2141615b05aedd71e910ecb008a9c30c7aa /python
parentFix bogus doc comments generated by slice2cs - Close #500 (diff)
downloadice-860cd6940fc075f1b30d07b138f410d230ac0e14.tar.bz2
ice-860cd6940fc075f1b30d07b138f410d230ac0e14.tar.xz
ice-860cd6940fc075f1b30d07b138f410d230ac0e14.zip
Fixes for slice2py forward declarations - Close #490
Diffstat (limited to 'python')
-rw-r--r--python/test/Ice/objects/AllTests.py4
-rwxr-xr-xpython/test/Ice/objects/Collocated.py1
-rwxr-xr-xpython/test/Ice/objects/Server.py1
-rw-r--r--python/test/Ice/objects/TestI.py9
4 files changed, 12 insertions, 3 deletions
diff --git a/python/test/Ice/objects/AllTests.py b/python/test/Ice/objects/AllTests.py
index d2b666a655b..13dcef18c27 100644
--- a/python/test/Ice/objects/AllTests.py
+++ b/python/test/Ice/objects/AllTests.py
@@ -341,8 +341,10 @@ def allTests(helper, communicator):
test(f11.name == "F11")
test(f12.name == "F12")
- f21, f22 = initial.opF2(Test.F2Prx.uncheckedCast(communicator.stringToProxy("F21")))
+ ref = "F21:{0}".format(helper.getTestEndpoint())
+ f21, f22 = initial.opF2(Test.F2Prx.uncheckedCast(communicator.stringToProxy(ref)))
test(f21.ice_getIdentity().name == "F21")
+ f21.op()
test(f22.ice_getIdentity().name == "F22")
if initial.hasF3():
diff --git a/python/test/Ice/objects/Collocated.py b/python/test/Ice/objects/Collocated.py
index ba6d78fd96e..11cc2409353 100755
--- a/python/test/Ice/objects/Collocated.py
+++ b/python/test/Ice/objects/Collocated.py
@@ -20,6 +20,7 @@ class Collocated(TestHelper):
adapter = communicator.createObjectAdapter("TestAdapter")
initial = TestI.InitialI(adapter)
adapter.add(initial, Ice.stringToIdentity("initial"))
+ adapter.add(TestI.F2I(), Ice.stringToIdentity("F21"))
adapter.add(TestI.UnexpectedObjectExceptionTestI(), Ice.stringToIdentity("uoet"))
# adapter.activate() // Don't activate OA to ensure collocation is used.
AllTests.allTests(self, communicator)
diff --git a/python/test/Ice/objects/Server.py b/python/test/Ice/objects/Server.py
index 2a9df124f4c..d3e7d633f23 100755
--- a/python/test/Ice/objects/Server.py
+++ b/python/test/Ice/objects/Server.py
@@ -32,6 +32,7 @@ class Server(TestHelper):
adapter = communicator.createObjectAdapter("TestAdapter")
initial = TestI.InitialI(adapter)
adapter.add(initial, Ice.stringToIdentity("initial"))
+ adapter.add(TestI.F2I(), Ice.stringToIdentity("F21"))
uoet = TestI.UnexpectedObjectExceptionTestI()
adapter.add(uoet, Ice.stringToIdentity("uoet"))
adapter.activate()
diff --git a/python/test/Ice/objects/TestI.py b/python/test/Ice/objects/TestI.py
index e28c882a1bf..7bebf279f22 100644
--- a/python/test/Ice/objects/TestI.py
+++ b/python/test/Ice/objects/TestI.py
@@ -197,10 +197,11 @@ class InitialI(Test.Initial):
return (f11, Test.F1("F12"))
def opF2(self, f21, current=None):
- return (f21, current.adapter.getCommunicator().stringToProxy("F22"))
+ return (f21, Test.F2Prx.uncheckedCast(current.adapter.getCommunicator().stringToProxy("F22")))
def opF3(self, f31, current):
- return (f31, Test.F3(Test.F1("F12"), current.adapter.getCommunicator().stringToProxy("F22")))
+ return (f31, Test.F3(Test.F1("F12"),
+ Test.F2Prx.uncheckedCast(current.adapter.getCommunicator().stringToProxy("F22"))))
def hasF3(self, current):
return True
@@ -209,3 +210,7 @@ class InitialI(Test.Initial):
class UnexpectedObjectExceptionTestI(Test.UnexpectedObjectExceptionTest):
def op(self, current=None):
return Test.AlsoEmpty()
+
+class F2I(Test.F2):
+ def op(self, current=None):
+ pass