diff options
author | Jose <jose@zeroc.com> | 2018-09-13 18:13:35 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-09-13 18:17:32 +0200 |
commit | 873c217879435669b74ea501a058f47c0255312b (patch) | |
tree | 61517e00e0153d0c29d8950cafb7c54afaf900f5 /python | |
parent | Allow to build Python 3.7 with Visual Studio 2017 (diff) | |
download | ice-873c217879435669b74ea501a058f47c0255312b.tar.bz2 ice-873c217879435669b74ea501a058f47c0255312b.tar.xz ice-873c217879435669b74ea501a058f47c0255312b.zip |
Test using Value type as a class data member
See #203
Diffstat (limited to 'python')
-rw-r--r-- | python/test/Ice/objects/AllTests.py | 7 | ||||
-rw-r--r-- | python/test/Ice/objects/Test.ice | 14 | ||||
-rw-r--r-- | python/test/Ice/objects/TestI.py | 3 |
3 files changed, 23 insertions, 1 deletions
diff --git a/python/test/Ice/objects/AllTests.py b/python/test/Ice/objects/AllTests.py index b8dde23b1b4..2ddefafb01b 100644 --- a/python/test/Ice/objects/AllTests.py +++ b/python/test/Ice/objects/AllTests.py @@ -111,6 +111,13 @@ def allTests(helper, communicator): test(isinstance(h, Test.H)) print("ok") + sys.stdout.write("getting K... ") + sys.stdout.flush() + k = initial.getK() + test(isinstance(k.value, Test.L)) + test(k.value.data == "l") + 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"))) diff --git a/python/test/Ice/objects/Test.ice b/python/test/Ice/objects/Test.ice index 7f9a7ebaa62..a6a3034400e 100644 --- a/python/test/Ice/objects/Test.ice +++ b/python/test/Ice/objects/Test.ice @@ -172,6 +172,16 @@ class Recursive Recursive v; } +class K +{ + Value value; +} + +class L +{ + string data; +} + interface Initial { void shutdown(); @@ -190,9 +200,11 @@ interface Initial void getAll(out B b1, out B b2, out C theC, out D theD); + I getH(); I getI(); I getJ(); - I getH(); + + K getK(); D1 getD1(D1 d1); void throwEDerived() throws EDerived; diff --git a/python/test/Ice/objects/TestI.py b/python/test/Ice/objects/TestI.py index 7bdcbc6b338..6da50f05ef2 100644 --- a/python/test/Ice/objects/TestI.py +++ b/python/test/Ice/objects/TestI.py @@ -153,6 +153,9 @@ class InitialI(Test.Initial): def getH(self, current=None): return HI() + def getK(self, current=None): + return Test.K(Test.L("l")) + def getD1(self, d1, current=None): return d1 |