diff --git a/test/language/computed-property-names/class/method/constructor-cannot-be-getter.js b/test/language/computed-property-names/class/method/constructor-cannot-be-getter.js index 895b0e79ead89e73d98ad7f93c30556a1b386814..318b58b824ab199f76f7c839d4d96e57d208856c 100644 --- a/test/language/computed-property-names/class/method/constructor-cannot-be-getter.js +++ b/test/language/computed-property-names/class/method/constructor-cannot-be-getter.js @@ -3,7 +3,7 @@ /*--- es6id: 14.5.3 description: > - computed property getter names cannot be "constructor" + computed property getter names can be called "constructor" negative: SyntaxError ---*/ class C4 { diff --git a/test/language/computed-property-names/class/method/constructor-cannot-be-setter.js b/test/language/computed-property-names/class/method/constructor-cannot-be-setter.js index dd99625d6e992a447952645d70b164467c05c12b..0ae0295e643e603d589a5803b7bbd63de5c58797 100644 --- a/test/language/computed-property-names/class/method/constructor-cannot-be-setter.js +++ b/test/language/computed-property-names/class/method/constructor-cannot-be-setter.js @@ -3,7 +3,7 @@ /*--- es6id: 14.5.3 description: > - computed property setter names cannot be "constructor" + computed property setter names can be called "constructor" negative: SyntaxError ---*/ class C4 { diff --git a/test/language/computed-property-names/class/method/constructor-no-duplicate-1.js b/test/language/computed-property-names/class/method/constructor-no-duplicate-1.js index e762bfbb0546d96745303b80fad353df9a456463..61c2f9d55ad9038fac4b10f2a69a74c2fe96c13a 100644 --- a/test/language/computed-property-names/class/method/constructor-no-duplicate-1.js +++ b/test/language/computed-property-names/class/method/constructor-no-duplicate-1.js @@ -3,8 +3,7 @@ /*--- es6id: 12.2.5 description: > - computed property names can be "constructor", but duplicates are not allowed, 1 -negative: SyntaxError + computed property names can be "constructor" ---*/ class C { constructor() {} diff --git a/test/language/computed-property-names/class/method/constructor-no-duplicate-2.js b/test/language/computed-property-names/class/method/constructor-no-duplicate-2.js index 79594ac15ed1e3eed6d22a2028bc877b5796a275..a08aa11cc57920cda317cc52b652f10e1a36a838 100644 --- a/test/language/computed-property-names/class/method/constructor-no-duplicate-2.js +++ b/test/language/computed-property-names/class/method/constructor-no-duplicate-2.js @@ -3,8 +3,7 @@ /*--- es6id: 12.2.5 description: > - computed property names can be "constructor", but duplicates are not allowed, 2 -negative: SyntaxError + computed property names can be "constructor" ---*/ class C { ['constructor']() {} diff --git a/test/language/computed-property-names/class/method/constructor-no-duplicate-3.js b/test/language/computed-property-names/class/method/constructor-no-duplicate-3.js index 3e0297e89e92b787d06b6428de30934a5968af0e..6dc02cedafd6b9ff37662b6730b101e45866732d 100644 --- a/test/language/computed-property-names/class/method/constructor-no-duplicate-3.js +++ b/test/language/computed-property-names/class/method/constructor-no-duplicate-3.js @@ -3,8 +3,7 @@ /*--- es6id: 12.2.5 description: > - computed property names can be "constructor", but duplicates are not allowed, 2 -negative: SyntaxError + computed property names can be "constructor" ---*/ class C { ['constructor']() {} diff --git a/test/language/computed-property-names/class/static/generator-prototype.js b/test/language/computed-property-names/class/static/generator-prototype.js index 16c558217b979db7e4c3f9b2f7bca28afb3a6370..ded8fe7bf043c9cf229d299f60d2e83a120c34e0 100644 --- a/test/language/computed-property-names/class/static/generator-prototype.js +++ b/test/language/computed-property-names/class/static/generator-prototype.js @@ -1,12 +1,13 @@ // Copyright (C) Copyright 2014 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -es6id: 12.2.5 +es6id: 14.5.14 description: > In a class, computed property names for static - generators cannot be "prototype" -negative: SyntaxError + generators that are named "prototype" throw a TypeError ---*/ -class C { - static *['prototype']() {} -} +assert.throws(TypeError, function() { + class C { + static *['prototype']() {} + } +}); diff --git a/test/language/computed-property-names/class/static/getter-prototype.js b/test/language/computed-property-names/class/static/getter-prototype.js index f445ee0f3dd0102d8275f885da346f0ea87d361f..2754385d01a57861978c729627dbb85972bd4a76 100644 --- a/test/language/computed-property-names/class/static/getter-prototype.js +++ b/test/language/computed-property-names/class/static/getter-prototype.js @@ -1,12 +1,13 @@ // Copyright (C) Copyright 2014 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -es6id: 12.2.5 +es6id: 14.5.14 description: > In a class, computed property names for static - getters cannot be "prototype" -negative: SyntaxError + getters that are named "prototype" throw a TypeError ---*/ -class C { - static get ['prototype']() {} -} +assert.throws(TypeError, function() { + class C { + static get ['prototype']() {} + } +}); diff --git a/test/language/computed-property-names/class/static/method-prototype.js b/test/language/computed-property-names/class/static/method-prototype.js index df2f59af1285972ddce90cde49085460440255b7..d87476a4842e1a81972b6f81fcb98fe6d6407c4e 100644 --- a/test/language/computed-property-names/class/static/method-prototype.js +++ b/test/language/computed-property-names/class/static/method-prototype.js @@ -1,12 +1,14 @@ // Copyright (C) Copyright 2014 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -es6id: 12.2.5 +es6id: 14.5.14 description: > In a class, computed property names for static - methods cannot be "prototype" -negative: SyntaxError + methods that are named "prototype" throw a TypeError ---*/ -class C { - static ['prototype']() {} -} + +assert.throws(TypeError, function() { + class C { + static ['prototype']() {} + } +}); diff --git a/test/language/computed-property-names/class/static/setter-prototype.js b/test/language/computed-property-names/class/static/setter-prototype.js index 56505eab057b29cbaa225551d230bfbbe97dc4c4..abdbcae63a270c68531918a86d433144f4293731 100644 --- a/test/language/computed-property-names/class/static/setter-prototype.js +++ b/test/language/computed-property-names/class/static/setter-prototype.js @@ -1,12 +1,14 @@ // Copyright (C) Copyright 2014 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -es6id: 12.2.5 +es6id: 14.5.14 description: > In a class, computed property names for static - setters cannot be "prototype" -negative: SyntaxError + setters that are named "prototype" throw a TypeError ---*/ -class C { - static set ['prototype'](x) {} -} + +assert.throws(TypeError, function() { + class C { + static set ['prototype'](x) {} + } +});