diff --git a/test/annexB/language/statements/labeled/function-declaration.js b/test/annexB/language/statements/labeled/function-declaration.js index 86eb59042b871312d79b1ca3aba51fc0de7b4218..d93df289b958ab69c4d3cd0557bfe40f94d73f2e 100644 --- a/test/annexB/language/statements/labeled/function-declaration.js +++ b/test/annexB/language/statements/labeled/function-declaration.js @@ -9,3 +9,4 @@ flags: [noStrict] ---*/ label: function g() {} +label1: label2: function f() {} diff --git a/test/language/statements/labeled/value-await-module-escaped.js b/test/language/statements/labeled/value-await-module-escaped.js new file mode 100644 index 0000000000000000000000000000000000000000..7997a19faf6b4d38532c534d676cf9980a71910f --- /dev/null +++ b/test/language/statements/labeled/value-await-module-escaped.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `await` is a reserved identifier in module code and may not be used as a label. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if the goal symbol of the syntactic grammar is Module and + the StringValue of IdentifierName is "await". +negative: + phase: early + type: SyntaxError +flags: [module] +---*/ + +aw\u0061it: 1; diff --git a/test/language/statements/labeled/value-await-module.js b/test/language/statements/labeled/value-await-module.js new file mode 100644 index 0000000000000000000000000000000000000000..4744a2fd62bac1921dc86fe5b04518dff6b8e18f --- /dev/null +++ b/test/language/statements/labeled/value-await-module.js @@ -0,0 +1,18 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `await` is a reserved identifier in module code and may not be used as a label. +info: | + LabelIdentifier : await + + It is a Syntax Error if the goal symbol of the syntactic grammar is Module. +negative: + phase: early + type: SyntaxError +flags: [module] +---*/ + +await: 1; diff --git a/test/language/statements/labeled/value-await-non-module-escaped.js b/test/language/statements/labeled/value-await-non-module-escaped.js new file mode 100644 index 0000000000000000000000000000000000000000..71cb1b51b7c08cedf54f8d082647580cba037e21 --- /dev/null +++ b/test/language/statements/labeled/value-await-non-module-escaped.js @@ -0,0 +1,15 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `await` is not a reserved identifier in non-module code and may be used as a label. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if the goal symbol of the syntactic grammar is Module and + the StringValue of IdentifierName is "await". +---*/ + +aw\u0061it: 1; diff --git a/test/language/statements/labeled/value-await-non-module.js b/test/language/statements/labeled/value-await-non-module.js new file mode 100644 index 0000000000000000000000000000000000000000..295f92db4ceb3b9b46a4fb6dcea24d8f4f5e0db9 --- /dev/null +++ b/test/language/statements/labeled/value-await-non-module.js @@ -0,0 +1,14 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `await` is not a reserved identifier in non-module code and may be used as a label. +info: | + LabelIdentifier : await + + It is a Syntax Error if the goal symbol of the syntactic grammar is Module. +---*/ + +await: 1; diff --git a/test/language/statements/labeled/value-yield-non-strict-escaped.js b/test/language/statements/labeled/value-yield-non-strict-escaped.js new file mode 100644 index 0000000000000000000000000000000000000000..a8a328fb414145eb4fe3fa404f0874f039475c3c --- /dev/null +++ b/test/language/statements/labeled/value-yield-non-strict-escaped.js @@ -0,0 +1,11 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `yield` is not a reserved identifier in non-strict mode code and may be used as a label. +flags: [noStrict] +---*/ + +yi\u0065ld: 1; diff --git a/test/language/statements/labeled/value-yield-strict-escaped.js b/test/language/statements/labeled/value-yield-strict-escaped.js new file mode 100644 index 0000000000000000000000000000000000000000..d77bea83b24a66ef9bc3140b3272dec9441f3045 --- /dev/null +++ b/test/language/statements/labeled/value-yield-strict-escaped.js @@ -0,0 +1,20 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `yield` is a reserved identifier in strict mode code and may not be used as a label. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +yi\u0065ld: 1;