summaryrefslogtreecommitdiff
path: root/js
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 /js
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 'js')
-rw-r--r--js/test/Ice/objects/Client.js31
-rw-r--r--js/test/Ice/objects/Test.ice33
2 files changed, 64 insertions, 0 deletions
diff --git a/js/test/Ice/objects/Client.js b/js/test/Ice/objects/Client.js
index 9357c8e8c03..c67ed7bb28a 100644
--- a/js/test/Ice/objects/Client.js
+++ b/js/test/Ice/objects/Client.js
@@ -379,6 +379,37 @@
{
h = obj;
test(h);
+ out.writeLine("ok");
+ out.write("getting D1... ");
+ return initial.getD1(new Test.D1(new Test.A1("a1"),
+ new Test.A1("a2"),
+ new Test.A1("a3"),
+ new Test.A1("a4")));
+ }
+ ).then(
+ function(d1)
+ {
+ test(d1.a1.name == "a1");
+ test(d1.a2.name == "a2");
+ test(d1.a3.name == "a3");
+ test(d1.a4.name == "a4");
+ out.writeLine("ok");
+ out.write("throw EDerived... ");
+ return initial.throwEDerived();
+ }
+ ).then(
+ function()
+ {
+ test(false);
+ },
+ function(ex)
+ {
+ test(ex instanceof Test.EDerived);
+ test(ex.a1.name == "a1");
+ test(ex.a2.name == "a2");
+ test(ex.a3.name == "a3");
+ test(ex.a4.name == "a4");
+ out.writeLine("ok");
out.write("setting I... ");
return initial.setI(i);
}
diff --git a/js/test/Ice/objects/Test.ice b/js/test/Ice/objects/Test.ice
index 3253877694e..2c229c25bbe 100644
--- a/js/test/Ice/objects/Test.ice
+++ b/js/test/Ice/objects/Test.ice
@@ -109,6 +109,36 @@ 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;
+};
+
module Inner
{
@@ -155,6 +185,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);