| Index: test/webkit/class-syntax-extends.js
|
| diff --git a/test/webkit/class-syntax-extends.js b/test/webkit/class-syntax-extends.js
|
| index ccd3f297ed177b82121308136a19169c628c9315..d505bf89fb375ccaeefe28b5c266a641d6ea2227 100644
|
| --- a/test/webkit/class-syntax-extends.js
|
| +++ b/test/webkit/class-syntax-extends.js
|
| @@ -58,8 +58,8 @@ shouldBe('x.prototype.__proto__', 'Base.prototype');
|
| shouldBe('Object.getPrototypeOf(x.prototype)', 'Base.prototype');
|
| shouldBe('x = class extends null { constructor() { } }; x.__proto__', 'Function.prototype');
|
| shouldBe('x.__proto__', 'Function.prototype');
|
| -shouldThrow('x = class extends 3 { constructor() { } }; x.__proto__', '"TypeError: Class extends value 3 is not a function or null"');
|
| -shouldThrow('x = class extends "abc" { constructor() { } }; x.__proto__', '"TypeError: Class extends value abc is not a function or null"');
|
| +shouldThrow('x = class extends 3 { constructor() { } }; x.__proto__', '"TypeError: Class extends value 3 is not a constructor or null"');
|
| +shouldThrow('x = class extends "abc" { constructor() { } }; x.__proto__', '"TypeError: Class extends value abc is not a constructor or null"');
|
| shouldNotThrow('baseWithBadPrototype = function () {}; baseWithBadPrototype.prototype = 3; new baseWithBadPrototype');
|
| shouldThrow('x = class extends baseWithBadPrototype { constructor() { } }', '"TypeError: Class extends value does not have valid prototype property 3"');
|
| shouldNotThrow('baseWithBadPrototype.prototype = "abc"');
|
| @@ -92,10 +92,10 @@ shouldBe('x = 1; namespace = {}; namespace.A = class { constructor() { } }; try
|
|
|
| shouldBe('Object.getPrototypeOf((class { constructor () { } }).prototype)', 'Object.prototype');
|
| shouldBe('Object.getPrototypeOf((class extends null { constructor () { super(); } }).prototype)', 'null');
|
| -shouldThrow('new (class extends undefined { constructor () { this } })', '"TypeError: Class extends value undefined is not a function or null"');
|
| -shouldThrow('new (class extends undefined { constructor () { super(); } })', '"TypeError: Class extends value undefined is not a function or null"');
|
| -shouldThrow('x = {}; new (class extends undefined { constructor () { return x; } })', '"TypeError: Class extends value undefined is not a function or null"');
|
| -shouldThrow('y = 12; new (class extends undefined { constructor () { return y; } })', '"TypeError: Class extends value undefined is not a function or null"');
|
| +shouldThrow('new (class extends undefined { constructor () { this } })', '"TypeError: Class extends value undefined is not a constructor or null"');
|
| +shouldThrow('new (class extends undefined { constructor () { super(); } })', '"TypeError: Class extends value undefined is not a constructor or null"');
|
| +shouldThrow('x = {}; new (class extends undefined { constructor () { return x; } })', '"TypeError: Class extends value undefined is not a constructor or null"');
|
| +shouldThrow('y = 12; new (class extends undefined { constructor () { return y; } })', '"TypeError: Class extends value undefined is not a constructor or null"');
|
| shouldBeTrue ('class x {}; new (class extends null { constructor () { return new x; } }) instanceof x');
|
| shouldThrow('new (class extends null { constructor () { this; } })', '"ReferenceError: this is not defined"');
|
| shouldThrow('new (class extends null { constructor () { super(); } })', '"TypeError: super is not a constructor"');
|
|
|