diff --git a/test/language/statements/variable/arguments-strict-list-first-init.js b/test/language/statements/variable/arguments-strict-list-first-init.js new file mode 100644 index 0000000000000000000000000000000000000000..b155a1578ce49934d40b6af05748834890786ebd --- /dev/null +++ b/test/language/statements/variable/arguments-strict-list-first-init.js @@ -0,0 +1,15 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-variable-statement +description: arguments as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +var arguments = 42, a; diff --git a/test/language/statements/variable/arguments-strict-list-middle-init.js b/test/language/statements/variable/arguments-strict-list-middle-init.js new file mode 100644 index 0000000000000000000000000000000000000000..23c53836d08343381c47ba2aaeae1aa3905e94db --- /dev/null +++ b/test/language/statements/variable/arguments-strict-list-middle-init.js @@ -0,0 +1,15 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-variable-statement +description: arguments as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +var a, arguments = 42, b; diff --git a/test/language/statements/variable/eval-non-strict.js b/test/language/statements/variable/eval-non-strict.js new file mode 100644 index 0000000000000000000000000000000000000000..f3c942786e19c6ff41f696fd01d4544cf6395b58 --- /dev/null +++ b/test/language/statements/variable/eval-non-strict.js @@ -0,0 +1,10 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-variable-statement +description: arguments as local var identifier is allowed +flags: [noStrict] +---*/ + +var eval; diff --git a/test/language/statements/variable/eval-strict-list-final-init.js b/test/language/statements/variable/eval-strict-list-final-init.js new file mode 100644 index 0000000000000000000000000000000000000000..1be4ef8724d610c425ff3003d0119c00d84258a1 --- /dev/null +++ b/test/language/statements/variable/eval-strict-list-final-init.js @@ -0,0 +1,15 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-variable-statement +description: eval as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +var a, eval = 42; diff --git a/test/language/statements/variable/eval-strict-list-middle-init.js b/test/language/statements/variable/eval-strict-list-middle-init.js new file mode 100644 index 0000000000000000000000000000000000000000..78f9d0654021f319960ddece17aee305c871436c --- /dev/null +++ b/test/language/statements/variable/eval-strict-list-middle-init.js @@ -0,0 +1,15 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-variable-statement +description: arguments as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +var a, eval = 42, b; diff --git a/test/language/statements/variable/eval-strict-list-middle.js b/test/language/statements/variable/eval-strict-list-middle.js new file mode 100644 index 0000000000000000000000000000000000000000..2794f9910765d600ff95e2024f6ae885527bb97e --- /dev/null +++ b/test/language/statements/variable/eval-strict-list-middle.js @@ -0,0 +1,15 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-variable-statement +description: arguments as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +var a, eval, b;