diff --git a/test/language/statements/for-in/var-arguments-fn-strict-init.js b/test/language/statements/for-in/var-arguments-fn-strict-init.js new file mode 100644 index 0000000000000000000000000000000000000000..9c76686b071baafdf314bb325bf6f85f309ea8d8 --- /dev/null +++ b/test/language/statements/for-in/var-arguments-fn-strict-init.js @@ -0,0 +1,19 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-statement +description: > + 'for(var arguments = 42 in ...) {...}' throws SyntaxError in + strict mode within a function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + for (var arguments = 42 in null) {} +} diff --git a/test/language/statements/for-in/var-arguments-fn-strict.js b/test/language/statements/for-in/var-arguments-fn-strict.js new file mode 100644 index 0000000000000000000000000000000000000000..c2ae108ebfc56ebcad83cb8a057fc2cab0b70c53 --- /dev/null +++ b/test/language/statements/for-in/var-arguments-fn-strict.js @@ -0,0 +1,19 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-statement +description: > + 'for(var arguments in ...) {...}' throws SyntaxError in strict mode within a + function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + for (var arguments in null) {} +} diff --git a/test/language/statements/variable/arguments-fn-non-strict.js b/test/language/statements/variable/arguments-fn-non-strict.js new file mode 100644 index 0000000000000000000000000000000000000000..0683272952fa6219973d750f6f8cfbef404becc1 --- /dev/null +++ b/test/language/statements/variable/arguments-fn-non-strict.js @@ -0,0 +1,14 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.2.1-12 +esid: sec-variable-statement +description: > + arguments as local var identifier is allowed within a function declaration +flags: [noStrict] +---*/ + +function f() { + var arguments; +} diff --git a/test/language/statements/variable/arguments-fn-strict-list-final-init.js b/test/language/statements/variable/arguments-fn-strict-list-final-init.js new file mode 100644 index 0000000000000000000000000000000000000000..21253504e696f52be92d77efd755d0ddbd091a84 --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-list-final-init.js @@ -0,0 +1,20 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.2.1-28-s +esid: sec-variable-statement +description: > + arguments as local var identifier assigned to throws SyntaxError + in strict mode within a function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var a, arguments = 42; +} diff --git a/test/language/statements/variable/arguments-fn-strict-list-final.js b/test/language/statements/variable/arguments-fn-strict-list-final.js new file mode 100644 index 0000000000000000000000000000000000000000..824c88222135d1eeb2d2e1c34cbfd8e5029cc8f2 --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-list-final.js @@ -0,0 +1,20 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.2.1-30-s +esid: sec-variable-statement +description: > + arguments as local var identifier throws SyntaxError in strict mode within a + function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var a = 42, arguments; +} diff --git a/test/language/statements/variable/arguments-fn-strict-list-first-init.js b/test/language/statements/variable/arguments-fn-strict-list-first-init.js new file mode 100644 index 0000000000000000000000000000000000000000..8e6e022b66355f22972ab9055b2758a5a529d69c --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-list-first-init.js @@ -0,0 +1,19 @@ +// 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 within a + function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var arguments = 42, a; +} diff --git a/test/language/statements/variable/arguments-fn-strict-list-first.js b/test/language/statements/variable/arguments-fn-strict-list-first.js new file mode 100644 index 0000000000000000000000000000000000000000..7b7d78e73dbad7f1b2c6dc02210c10e271b4f805 --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-list-first.js @@ -0,0 +1,20 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.2.1-25-s +esid: sec-variable-statement +description: > + arguments as local var identifier throws SyntaxError in strict mode within a + function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var arguments, a; +} diff --git a/test/language/statements/variable/arguments-fn-strict-list-middle-init.js b/test/language/statements/variable/arguments-fn-strict-list-middle-init.js new file mode 100644 index 0000000000000000000000000000000000000000..9001c3d4fc8529c71e48afa926396d7a58345d22 --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-list-middle-init.js @@ -0,0 +1,19 @@ +// 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 within a + function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var a, arguments = 42, b; +} diff --git a/test/language/statements/variable/arguments-fn-strict-list-middle.js b/test/language/statements/variable/arguments-fn-strict-list-middle.js new file mode 100644 index 0000000000000000000000000000000000000000..181f0c060ca1e77410a876556cf42dd5a1f4014f --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-list-middle.js @@ -0,0 +1,20 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.2.1-33-s +esid: sec-variable-statement +description: > + arguments as local var identifier throws SyntaxError in strict mode within a + function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var a, arguments, b; +} diff --git a/test/language/statements/variable/arguments-fn-strict-list-repeated.js b/test/language/statements/variable/arguments-fn-strict-list-repeated.js new file mode 100644 index 0000000000000000000000000000000000000000..7ca2ba5bda5f273b0354694be7be65038c031823 --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-list-repeated.js @@ -0,0 +1,20 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.2.1-32-s +esid: sec-variable-statement +description: > + arguments as local var identifier defined twice and assigned once + throws SyntaxError in strict mode within a function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var arguments, arguments = 42; +} diff --git a/test/language/statements/variable/arguments-fn-strict-single-init.js b/test/language/statements/variable/arguments-fn-strict-single-init.js new file mode 100644 index 0000000000000000000000000000000000000000..50919cd3b450081867f930fe1ab46eb2f355c324 --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-single-init.js @@ -0,0 +1,20 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.2.1-23-s +esid: sec-variable-statement +description: > + arguments as local var identifier assigned to throws SyntaxError + in strict mode within a function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var arguments = 42; +} diff --git a/test/language/statements/variable/arguments-fn-strict-single.js b/test/language/statements/variable/arguments-fn-strict-single.js new file mode 100644 index 0000000000000000000000000000000000000000..bbe8dbb414299afd87a9c6e5bc73ccc171af4686 --- /dev/null +++ b/test/language/statements/variable/arguments-fn-strict-single.js @@ -0,0 +1,20 @@ +// Copyright (c) 2018 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.2.1-12-s +esid: sec-variable-statement +description: > + arguments as local var identifier throws SyntaxError in strict mode within a + function declaration +flags: [onlyStrict] +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +function f() { + var arguments; +}