diff options
author | Jose <jose@zeroc.com> | 2016-08-19 21:25:18 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-08-19 21:25:18 +0200 |
commit | c8d32e04873be7938915c606027c84c8ab832f6b (patch) | |
tree | f862751cfaddcf5bb7b82a7c04a299d471f948d4 /js/test/Ice/exceptions/Client.js | |
parent | Fix ICE-7278 (diff) | |
download | ice-c8d32e04873be7938915c606027c84c8ab832f6b.tar.bz2 ice-c8d32e04873be7938915c606027c84c8ab832f6b.tar.xz ice-c8d32e04873be7938915c606027c84c8ab832f6b.zip |
ES6 mapping updates
Diffstat (limited to 'js/test/Ice/exceptions/Client.js')
-rw-r--r-- | js/test/Ice/exceptions/Client.js | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/js/test/Ice/exceptions/Client.js b/js/test/Ice/exceptions/Client.js index 7c54701e5b0..2b2c789b9fc 100644 --- a/js/test/Ice/exceptions/Client.js +++ b/js/test/Ice/exceptions/Client.js @@ -16,29 +16,25 @@ var allTests = function(out, communicator, Test, bidir) { - var EmptyI = function() + class EmptyI extends Test.Empty { - }; - - EmptyI.prototype = new Test.Empty(); - EmptyI.prototype.constructor = EmptyI; - - var ServantLocatorI = function() - { - }; + } - ServantLocatorI.prototype.locate = function(curr, cookie) + class ServantLocatorI { - return null; - }; + locate(curr, cookie) + { + return null; + } - ServantLocatorI.prototype.finished = function(curr, servant, cookie) - { - }; + finished(curr, servant, cookie) + { + } - ServantLocatorI.prototype.deactivate = function(category) - { - }; + deactivate(category) + { + } + } function ValueFactoryI() { @@ -56,7 +52,7 @@ } catch(err) { - p.fail(err); + p.reject(err); throw err; } } @@ -249,7 +245,7 @@ out.write("testing checked cast... "); return Test.ThrowerPrx.checkedCast(base); } - ).then( + ).then( function(obj) { thrower = obj; @@ -460,16 +456,7 @@ out.writeLine("ok"); return thrower.shutdown(); } - ).then( - function() - { - p.succeed(); - }, - function(ex) - { - p.fail(ex); - } - ); + ).then(p.resolve, p.reject); return p; }; @@ -483,12 +470,7 @@ { return allTests(out, c, Test); } - ).finally( - function() - { - return c.destroy(); - } - ); + ).finally(() => c.destroy); }; exports.__test__ = run; exports.__clientAllTests__ = allTests; |