diff options
Diffstat (limited to 'js/test')
-rw-r--r-- | js/test/Ice/optional/Client.js | 15 | ||||
-rw-r--r-- | js/test/Ice/optional/Test.ice | 20 | ||||
-rw-r--r-- | js/test/Ice/optionalBidir/AMDInitialI.js | 4 | ||||
-rw-r--r-- | js/test/Ice/optionalBidir/InitialI.js | 4 | ||||
-rw-r--r-- | js/test/Ice/optionalBidir/Test.ice | 20 | ||||
-rw-r--r-- | js/test/Ice/optionalBidir/TestAMD.ice | 20 |
6 files changed, 83 insertions, 0 deletions
diff --git a/js/test/Ice/optional/Client.js b/js/test/Ice/optional/Client.js index d79c795e607..2d23a42d4a4 100644 --- a/js/test/Ice/optional/Client.js +++ b/js/test/Ice/optional/Client.js @@ -341,6 +341,21 @@ ).then( function() { + var g = new Test.G(); + g.gg1Opt = new Test.G1("gg1Opt"); + g.gg2 = new Test.G2(new Ice.Long(0, 10)); + g.gg2Opt = new Test.G2(new Ice.Long(0, 20)); + g.gg1 = new Test.G1("gg1"); + return initial.opG(g); + } + ).then( + function(g) + { + test(g.gg1Opt.a == "gg1Opt"); + test(g.gg2.a.equals(new Ice.Long(0, 10))); + test(g.gg2Opt.a.equals(new Ice.Long(0, 20))); + test(g.gg1.a == "gg1"); + out.writeLine("ok"); out.write("testing marshaling of large containers with fixed size elements... "); var mc = new Test.MultiOptional(); diff --git a/js/test/Ice/optional/Test.ice b/js/test/Ice/optional/Test.ice index b6e59c7378a..a1ac4b3287e 100644 --- a/js/test/Ice/optional/Test.ice +++ b/js/test/Ice/optional/Test.ice @@ -171,6 +171,24 @@ class F extends E optional(1) A af; }; +class G1 +{ + string a; +}; + +class G2 +{ + long a; +}; + +class G +{ + optional(1) G1 gg1Opt; + G2 gg2; + optional(0) G2 gg2Opt; + G1 gg1; +}; + class Initial { void shutdown(); @@ -283,6 +301,8 @@ class Initial void sendOptionalClass(bool req, optional(1) OneOptional o); void returnOptionalClass(bool req, out optional(1) OneOptional o); + + G opG(G g); bool supportsRequiredParams(); diff --git a/js/test/Ice/optionalBidir/AMDInitialI.js b/js/test/Ice/optionalBidir/AMDInitialI.js index b11e38f4a16..41302532b24 100644 --- a/js/test/Ice/optionalBidir/AMDInitialI.js +++ b/js/test/Ice/optionalBidir/AMDInitialI.js @@ -355,6 +355,10 @@ { cb.ice_response(new TestAMD.OneOptional(53)); }, + opG_async: function(cb, g, current) + { + cb.ice_response(g); + }, supportsRequiredParams_async: function(cb, current) { cb.ice_response(false); diff --git a/js/test/Ice/optionalBidir/InitialI.js b/js/test/Ice/optionalBidir/InitialI.js index 010401d1998..f3d38c8c38f 100644 --- a/js/test/Ice/optionalBidir/InitialI.js +++ b/js/test/Ice/optionalBidir/InitialI.js @@ -348,6 +348,10 @@ sendOptionalClass: function(req, current) { }, + opG: function(g, current) + { + return g + }, returnOptionalClass: function(req, current) { return new Test.OneOptional(53); diff --git a/js/test/Ice/optionalBidir/Test.ice b/js/test/Ice/optionalBidir/Test.ice index 32f21a97695..8ca16a73190 100644 --- a/js/test/Ice/optionalBidir/Test.ice +++ b/js/test/Ice/optionalBidir/Test.ice @@ -171,6 +171,24 @@ class F extends E optional(1) A af; }; +class G1 +{ + string a; +}; + +class G2 +{ + long a; +}; + +class G +{ + optional(1) G1 gg1Opt; + G2 gg2; + optional(0) G2 gg2Opt; + G1 gg1; +}; + class Initial { void shutdown(); @@ -283,6 +301,8 @@ class Initial void sendOptionalClass(bool req, optional(1) OneOptional o); void returnOptionalClass(bool req, out optional(1) OneOptional o); + + G opG(G g); bool supportsRequiredParams(); diff --git a/js/test/Ice/optionalBidir/TestAMD.ice b/js/test/Ice/optionalBidir/TestAMD.ice index d136826465a..0ee848d7de0 100644 --- a/js/test/Ice/optionalBidir/TestAMD.ice +++ b/js/test/Ice/optionalBidir/TestAMD.ice @@ -171,6 +171,24 @@ class F extends E optional(1) A af; }; +class G1 +{ + string a; +}; + +class G2 +{ + long a; +}; + +class G +{ + optional(1) G1 gg1Opt; + G2 gg2; + optional(0) G2 gg2Opt; + G1 gg1; +}; + ["amd"] class Initial { void shutdown(); @@ -283,6 +301,8 @@ class F extends E void sendOptionalClass(bool req, optional(1) OneOptional o); void returnOptionalClass(bool req, out optional(1) OneOptional o); + + G opG(G g); bool supportsRequiredParams(); |