diff options
author | Jose <jose@zeroc.com> | 2015-11-19 16:27:16 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-11-19 16:27:16 +0100 |
commit | 87fc4e46d3108554762c44aa2fc46cb3a151f7e6 (patch) | |
tree | c3bc9f31e465fbc2d092100a63e7cf00abe963ed /php/test | |
parent | Fixed bug in Java/C# class data member generated patcher (diff) | |
download | ice-87fc4e46d3108554762c44aa2fc46cb3a151f7e6.tar.bz2 ice-87fc4e46d3108554762c44aa2fc46cb3a151f7e6.tar.xz ice-87fc4e46d3108554762c44aa2fc46cb3a151f7e6.zip |
Objects test updates to sync with Java/C#
Diffstat (limited to 'php/test')
-rw-r--r-- | php/test/Ice/objects/Client.php | 25 | ||||
-rw-r--r-- | php/test/Ice/objects/Test.ice | 32 |
2 files changed, 57 insertions, 0 deletions
diff --git a/php/test/Ice/objects/Client.php b/php/test/Ice/objects/Client.php index e9e33a01739..b57d585093b 100644 --- a/php/test/Ice/objects/Client.php +++ b/php/test/Ice/objects/Client.php @@ -346,6 +346,31 @@ function allTests($communicator) $h = $initial->getH(); test($h != null and $h instanceof Test_H); echo "ok\n"; + + echo "getting D1... "; + flush(); + $d1 = $initial->getD1(new Test_D1(new Test_A1("a1"), new Test_A1("a2"), new Test_A1("a3"), new Test_A1("a4"))); + test($d1->a1->name == "a1"); + test($d1->a2->name == "a2"); + test($d1->a3->name == "a3"); + test($d1->a4->name == "a4"); + echo "ok\n"; + + echo "throw EDerived... "; + flush(); + try + { + $initial->throwEDerived(); + test(false); + } + catch(Test_EDerived $e) + { + test($e->a1->name == "a1"); + test($e->a2->name == "a2"); + test($e->a3->name == "a3"); + test($e->a4->name == "a4"); + } + echo "ok\n"; echo "setting I... "; flush(); diff --git a/php/test/Ice/objects/Test.ice b/php/test/Ice/objects/Test.ice index 9416490c825..0baceedbf46 100644 --- a/php/test/Ice/objects/Test.ice +++ b/php/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); |