summaryrefslogtreecommitdiff
path: root/python/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-11-19 16:27:16 +0100
committerJose <jose@zeroc.com>2015-11-19 16:27:16 +0100
commit87fc4e46d3108554762c44aa2fc46cb3a151f7e6 (patch)
treec3bc9f31e465fbc2d092100a63e7cf00abe963ed /python/test
parentFixed bug in Java/C# class data member generated patcher (diff)
downloadice-87fc4e46d3108554762c44aa2fc46cb3a151f7e6.tar.bz2
ice-87fc4e46d3108554762c44aa2fc46cb3a151f7e6.tar.xz
ice-87fc4e46d3108554762c44aa2fc46cb3a151f7e6.zip
Objects test updates to sync with Java/C#
Diffstat (limited to 'python/test')
-rw-r--r--python/test/Ice/objects/AllTests.py21
-rw-r--r--python/test/Ice/objects/Test.ice32
-rw-r--r--python/test/Ice/objects/TestI.py6
3 files changed, 59 insertions, 0 deletions
diff --git a/python/test/Ice/objects/AllTests.py b/python/test/Ice/objects/AllTests.py
index d7de69b901c..3d46a6ca643 100644
--- a/python/test/Ice/objects/AllTests.py
+++ b/python/test/Ice/objects/AllTests.py
@@ -107,6 +107,27 @@ def allTests(communicator):
h = initial.getH()
test(isinstance(h, Test.H))
print("ok")
+
+ sys.stdout.write("getting D1... ")
+ sys.stdout.flush()
+ d1 = initial.getD1(Test.D1(Test.A1("a1"), Test.A1("a2"), Test.A1("a3"), Test.A1("a4")));
+ test(d1.a1.name == "a1")
+ test(d1.a2.name == "a2")
+ test(d1.a3.name == "a3")
+ test(d1.a4.name == "a4")
+ print("ok")
+
+ sys.stdout.write("throw EDerived... ")
+ sys.stdout.flush()
+ try:
+ initial.throwEDerived()
+ test(false)
+ except Test.EDerived as e:
+ test(e.a1.name == "a1")
+ test(e.a2.name == "a2")
+ test(e.a3.name == "a3")
+ test(e.a4.name == "a4")
+ print("ok")
sys.stdout.write("setting I... ")
sys.stdout.flush()
diff --git a/python/test/Ice/objects/Test.ice b/python/test/Ice/objects/Test.ice
index 42852d1f75c..484cfdee59a 100644
--- a/python/test/Ice/objects/Test.ice
+++ b/python/test/Ice/objects/Test.ice
@@ -105,6 +105,35 @@ class CompactExt(CompactExtId) extends Compact
{
};
+class A1
+{
+ string name;
+};
+
+class B1
+{
+ A1 a1;
+ A1 a2;
+};
+
+class D1 extends B1
+{
+ A1 a3;
+ A1 a4;
+};
+
+exception EBase
+{
+ A1 a1;
+ A1 a2;
+};
+
+exception EDerived extends EBase
+{
+ A1 a3;
+ A1 a4;
+};
+
class Initial
{
void shutdown();
@@ -121,6 +150,9 @@ class Initial
I getJ();
I getH();
+ D1 getD1(D1 d1);
+ void throwEDerived() throws EDerived;
+
void setI(I theI);
BaseSeq opBaseSeq(BaseSeq inSeq, out BaseSeq outSeq);
diff --git a/python/test/Ice/objects/TestI.py b/python/test/Ice/objects/TestI.py
index 5fc8b0cedca..d75af432c32 100644
--- a/python/test/Ice/objects/TestI.py
+++ b/python/test/Ice/objects/TestI.py
@@ -147,6 +147,12 @@ class InitialI(Test.Initial):
def getH(self, current=None):
return HI()
+
+ def getD1(self, d1, current=None):
+ return d1
+
+ def throwEDerived(self, current=None):
+ raise Test.EDerived(Test.A1("a1"), Test.A1("a2"), Test.A1("a3"), Test.A1("a4"))
def setI(self, i, current=None):
pass