node/deps/v8/test/webkit/class-syntax-super-expected.txt
Ben Noordhuis 70d1f32f56 deps: update v8 to 4.4.63.9
Upgrade the bundled V8 and update code in src/ and lib/ to the new API.

Notable backwards incompatible changes are the removal of the smalloc
module and dropped support for CESU-8 decoding.  CESU-8 support can be
brought back if necessary by doing UTF-8 decoding ourselves.

This commit includes https://codereview.chromium.org/1192973004 to fix
a build error on python 2.6 systems.  The original commit log follows:

    Use optparse in js2c.py for python compatibility

    Without this change, V8 won't build on RHEL/CentOS 6 because the
    distro python is too old to know about the argparse module.

PR-URL: https://github.com/nodejs/io.js/pull/2022
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-04 11:56:14 -07:00

47 lines
3.7 KiB
Plaintext

Tests for ES6 class syntax "super"
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS (new Base) instanceof Base is true
PASS (new Derived) instanceof Derived is true
PASS (new Derived).callBaseMethod() is baseMethodValue
PASS x = (new Derived).callBaseMethod; x() is baseMethodValue
PASS (new Derived).callBaseMethodInGetter is baseMethodValue
PASS (new Derived).callBaseMethodInSetter = 1; valueInSetter is baseMethodValue
PASS (new Derived).baseMethodInGetterSetter is (new Base).baseMethod
PASS (new Derived).baseMethodInGetterSetter = 1; valueInSetter is (new Base).baseMethod
PASS Derived.staticMethod() is "base3"
PASS (new SecondDerived).chainMethod() is ["base", "derived", "secondDerived"]
PASS x = class extends Base { constructor() { super(); } super() {} } did not throw exception.
PASS x = class extends Base { constructor() { super(); } method() { super() } } threw exception SyntaxError: 'super' keyword unexpected here.
PASS x = class extends Base { constructor() { super(); } method() { super } } threw exception SyntaxError: 'super' keyword unexpected here.
PASS x = class extends Base { constructor() { super(); } method() { return new super } } threw exception SyntaxError: 'super' keyword unexpected here.
PASS x = class extends Base { constructor() { super(); } method1() { delete (super.foo) } method2() { delete super["foo"] } } did not throw exception.
PASS (new x).method1() threw exception ReferenceError: Unsupported reference to 'super'.
PASS (new x).method2() threw exception ReferenceError: Unsupported reference to 'super'.
PASS new (class { constructor() { return undefined; } }) instanceof Object is true
PASS new (class { constructor() { return 1; } }) instanceof Object is true
PASS new (class extends Base { constructor() { return undefined } }) threw exception ReferenceError: this is not defined.
PASS new (class extends Base { constructor() { super(); return undefined } }) instanceof Object is true
PASS x = { }; new (class extends Base { constructor() { return x } }); is x
PASS x instanceof Base is false
PASS new (class extends Base { constructor() { } }) threw exception ReferenceError: this is not defined.
PASS new (class extends Base { constructor() { return 1; } }) threw exception TypeError: Derived constructors may only return object or undefined.
PASS new (class extends null { constructor() { return undefined } }) threw exception ReferenceError: this is not defined.
PASS new (class extends null { constructor() { super(); return undefined } }) threw exception TypeError: function () {} is not a constructor.
PASS x = { }; new (class extends null { constructor() { return x } }); is x
PASS x instanceof Object is true
PASS new (class extends null { constructor() { } }) threw exception ReferenceError: this is not defined.
PASS new (class extends null { constructor() { return 1; } }) threw exception TypeError: Derived constructors may only return object or undefined.
PASS new (class extends null { constructor() { super() } }) threw exception TypeError: function () {} is not a constructor.
PASS new (class { constructor() { super() } }) threw exception SyntaxError: 'super' keyword unexpected here.
PASS function x() { super(); } threw exception SyntaxError: 'super' keyword unexpected here.
PASS new (class extends Object { constructor() { function x() { super() } } }) threw exception SyntaxError: 'super' keyword unexpected here.
PASS new (class extends Object { constructor() { function x() { super.method } } }) threw exception SyntaxError: 'super' keyword unexpected here.
PASS function x() { super.method(); } threw exception SyntaxError: 'super' keyword unexpected here.
PASS function x() { super(); } threw exception SyntaxError: 'super' keyword unexpected here.
PASS successfullyParsed is true
TEST COMPLETE