blob: 15ed5e6bc271d411022c4e9b0afb3f723c318741 [file] [log] [blame]
commit-queue@webkit.orgefc86f52015-12-30 21:08:16 +00001Tests for ES6 arrow function, access to the super property in arrow function
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6PASS (new B()).getValueParentFunction() is expectedValue
7PASS (new C(false)).value is expectedValue
commit-queue@webkit.orgebd964f2016-03-26 07:08:21 +00008PASS (new C(true)) threw exception ReferenceError: Cannot access uninitialized variable..
commit-queue@webkit.orgefc86f52015-12-30 21:08:16 +00009PASS E.getParentStaticValue() is expectedValue
10PASS f.prop is expectedValue + "-" + expectedValue
11PASS f.prop is expectedValue + "-" + "new-value"
12PASS (new F()).getParentValue() is expectedValue
gskachkov@gmail.comc85e6e62016-03-04 09:52:39 +000013PASS (new F()).genGetParentValue().next().value is expectedValue
14PASS (new F()).genGetParentValueDeepArrow().next().value is expectedValue
gskachkov@gmail.com3dcbb562016-05-13 08:22:21 +000015PASS (new class extends A { constructor() { ((a = super(), b = super.getValue())=>{ this.id = b; })() } }).id is expectedValue
16PASS (new class extends A { constructor() { ((a = super(), b = new.target)=>{ this.newTarget = b; })(); expectedNewTarget = new.target;} }).newTarget is expectedNewTarget
17PASS (new class extends A { constructor() { ((a = super.getValue())=>{ this.id = a; })() } }) threw exception ReferenceError: Cannot access uninitialized variable..
18PASS (new class extends A { constructor() { ((a = super.getValue(), b=super())=>{ this.id = a; })() } }) threw exception ReferenceError: Cannot access uninitialized variable..
19PASS (new class extends F { constructor() { ((a = super.prop)=>{ return a; })() } }) threw exception ReferenceError: Cannot access uninitialized variable..
20PASS (new class extends F { constructor() { ((a = super.prop, b=super())=>{ return a; })() } }) threw exception ReferenceError: Cannot access uninitialized variable..
21PASS (new class extends F { constructor() { ((a = (super.prop = "value"))=>{ this.id = a; })() } }) threw exception ReferenceError: Cannot access uninitialized variable..
22PASS (new class extends F { constructor() { ((a = (super.prop = "value"), b=super())=>{ this.id = a; })() } }) threw exception ReferenceError: Cannot access uninitialized variable..
23PASS (new class extends F { constructor() { ((a = super.genGetParentValue().next().value)=>{ this.id = a; })() } }) threw exception ReferenceError: Cannot access uninitialized variable..
24PASS (new class extends F { constructor() { ((a = super.genGetParentValue().next().value, b=super())=>{ this.id = a; })() } }) threw exception ReferenceError: Cannot access uninitialized variable..
commit-queue@webkit.orgefc86f52015-12-30 21:08:16 +000025PASS successfullyParsed is true
26
27TEST COMPLETE
28