diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/tests/test262/ch13/13.1 | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/test262/ch13/13.1')
59 files changed, 1332 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch13/13.1/13.1-1-1.js b/js/src/tests/test262/ch13/13.1/13.1-1-1.js new file mode 100644 index 000000000..a30103edc --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-1-1.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-1-1.js
+ * @description Duplicate identifier allowed in non-strict function declaration parameter list
+ */
+
+
+function testcase()
+{
+ try
+ {
+ eval('function foo(a,a){}');
+ return true;
+ }
+ catch (e) { return false }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-1-2.js b/js/src/tests/test262/ch13/13.1/13.1-1-2.js new file mode 100644 index 000000000..dc6708fb4 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-1-2.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-1-2.js
+ * @description Duplicate identifier allowed in non-strict function expression parameter list
+ */
+
+
+function testcase()
+{
+ try
+ {
+ eval('(function foo(a,a){})');
+ return true;
+ }
+ catch (e) { return false }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-1-s.js b/js/src/tests/test262/ch13/13.1/13.1-1-s.js new file mode 100644 index 000000000..4768b2072 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-1-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-1-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("function _13_1_1_fun(eval) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-10-s.js b/js/src/tests/test262/ch13/13.1/13.1-10-s.js new file mode 100644 index 000000000..802c13ab4 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-10-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-10-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has three identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var _13_1_10_fun = function (param, param, param) { };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-11-s.js b/js/src/tests/test262/ch13/13.1/13.1-11-s.js new file mode 100644 index 000000000..5f63b5627 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-11-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-11-s.js
+ * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration in strict mode
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("function eval() { };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-12-s.js b/js/src/tests/test262/ch13/13.1/13.1-12-s.js new file mode 100644 index 000000000..8ebf40b26 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-12-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-12-s.js
+ * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression in strict mode
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _13_1_12_s = {};
+
+ try {
+ eval("_13_1_12_s.x = function eval() {};");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-13-s.js b/js/src/tests/test262/ch13/13.1/13.1-13-s.js new file mode 100644 index 000000000..b1eb17421 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-13-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-13-s.js
+ * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the function name of a FunctionDeclaration in strict mode
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("function arguments() { };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-13gs.js b/js/src/tests/test262/ch13/13.1/13.1-13gs.js new file mode 100644 index 000000000..5287ab343 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-13gs.js @@ -0,0 +1,14 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-13gs.js
+ * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionDeclaration
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+"use strict";
+throw NotEarlyError;
+function arguments() { };
diff --git a/js/src/tests/test262/ch13/13.1/13.1-14-s.js b/js/src/tests/test262/ch13/13.1/13.1-14-s.js new file mode 100644 index 000000000..4841cee18 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-14-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-14-s.js
+ * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression in strict mode
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _13_1_14_s = {};
+
+ try {
+ eval("_13_1_14_s.x = function arguments() {};");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-15-s.js b/js/src/tests/test262/ch13/13.1/13.1-15-s.js new file mode 100644 index 000000000..0f49d0b97 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-15-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-15-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration in strict eval code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict';function _13_1_15_fun(eval) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-16-s.js b/js/src/tests/test262/ch13/13.1/13.1-16-s.js new file mode 100644 index 000000000..4dd74265a --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-16-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-16-s.js
+ * @description StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration when FuctionBody is strict code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("function _13_1_16_fun(eval) { 'use strict'; }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-17-s.js b/js/src/tests/test262/ch13/13.1/13.1-17-s.js new file mode 100644 index 000000000..e38ee27c6 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-17-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-17-s.js
+ * @description StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression in strict eval code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; var _13_1_17_fun = function (eval) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-18-s.js b/js/src/tests/test262/ch13/13.1/13.1-18-s.js new file mode 100644 index 000000000..51668c621 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-18-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-18-s.js
+ * @description StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression when FuctionBody is strict code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("var _13_1_18_fun = function (eval) { 'use strict'; }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-19-s.js b/js/src/tests/test262/ch13/13.1/13.1-19-s.js new file mode 100644 index 000000000..a063fba9f --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-19-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-19-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration in strict eval code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict';function _13_1_19_fun(arguments) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-1gs.js b/js/src/tests/test262/ch13/13.1/13.1-1gs.js new file mode 100644 index 000000000..bc4971291 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-1gs.js @@ -0,0 +1,14 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-1gs.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+"use strict";
+throw NotEarlyError;
+function _13_1_1_fun(eval) { }
\ No newline at end of file diff --git a/js/src/tests/test262/ch13/13.1/13.1-2-1.js b/js/src/tests/test262/ch13/13.1/13.1-2-1.js new file mode 100644 index 000000000..8d4155037 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-2-1.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-2-1.js
+ * @description eval allowed as formal parameter name of a non-strict function declaration
+ */
+
+
+function testcase()
+{
+ try
+ {
+ eval("function foo(eval){};");
+ return true;
+ }
+ catch (e) { }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-2-2.js b/js/src/tests/test262/ch13/13.1/13.1-2-2.js new file mode 100644 index 000000000..04e19c1a6 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-2-2.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-2-2.js
+ * @description eval allowed as formal parameter name of a non-strict function expression
+ */
+
+
+function testcase()
+{
+ eval("(function foo(eval){});");
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-2-5.js b/js/src/tests/test262/ch13/13.1/13.1-2-5.js new file mode 100644 index 000000000..e60842ff1 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-2-5.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-2-5.js
+ * @description arguments allowed as formal parameter name of a non-strict function declaration
+ */
+
+
+function testcase()
+{
+ try
+ {
+ eval("function foo(arguments){};");
+ return true;
+ }
+ catch (e) { }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-2-6.js b/js/src/tests/test262/ch13/13.1/13.1-2-6.js new file mode 100644 index 000000000..ce9b76b3c --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-2-6.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-2-6.js
+ * @description arguments allowed as formal parameter name of a non-strict function expression
+ */
+
+
+function testcase()
+{
+ eval("(function foo(arguments){});");
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-2-s.js b/js/src/tests/test262/ch13/13.1/13.1-2-s.js new file mode 100644 index 000000000..0e3c4473a --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-2-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-2-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var _13_1_2_fun = function (eval) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-20-s.js b/js/src/tests/test262/ch13/13.1/13.1-20-s.js new file mode 100644 index 000000000..064bc4deb --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-20-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-20-s.js
+ * @description StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration when FuctionBody is strict code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("function _13_1_20_fun(arguments) { 'use strict'; }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-21-s.js b/js/src/tests/test262/ch13/13.1/13.1-21-s.js new file mode 100644 index 000000000..2bf127083 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-21-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-21-s.js
+ * @description StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression in strict eval code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; var _13_1_21_fun = function (arguments) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-22-s.js b/js/src/tests/test262/ch13/13.1/13.1-22-s.js new file mode 100644 index 000000000..38e2e9726 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-22-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-22-s.js
+ * @description StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression when FuctionBody is strict code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("var _13_1_22_fun = function (arguments) { 'use strict'; }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-23-s.js b/js/src/tests/test262/ch13/13.1/13.1-23-s.js new file mode 100644 index 000000000..748044089 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-23-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-23-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has two identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; function _13_1_23_fun(param, param) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-24-s.js b/js/src/tests/test262/ch13/13.1/13.1-24-s.js new file mode 100644 index 000000000..b39fc5c19 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-24-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-24-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has two identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("function _13_1_24_fun(param, param) { 'use strict'; }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-25-s.js b/js/src/tests/test262/ch13/13.1/13.1-25-s.js new file mode 100644 index 000000000..45b0026b5 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-25-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-25-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has two identical parameters which are separated by a unique parameter name
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; function _13_1_25_fun(param1, param2, param1) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-26-s.js b/js/src/tests/test262/ch13/13.1/13.1-26-s.js new file mode 100644 index 000000000..c9f9410fd --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-26-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-26-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has two identical parameters which are separated by a unique parameter name
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("function _13_1_26_fun(param1, param2, param1) { 'use strict'; }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-27-s.js b/js/src/tests/test262/ch13/13.1/13.1-27-s.js new file mode 100644 index 000000000..aa5084332 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-27-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-27-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has three identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; function _13_1_27_fun(param, param, param) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-28-s.js b/js/src/tests/test262/ch13/13.1/13.1-28-s.js new file mode 100644 index 000000000..1dbda4fc5 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-28-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-28-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has three identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+
+ try {
+ eval("function _13_1_28_fun(param, param, param) { 'use strict'; }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-29-s.js b/js/src/tests/test262/ch13/13.1/13.1-29-s.js new file mode 100644 index 000000000..a7c74290d --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-29-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-29-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression that is contained in eval strict code and the function has two identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; var _13_1_29_fun = function (param, param) { };");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-3-1.js b/js/src/tests/test262/ch13/13.1/13.1-3-1.js new file mode 100644 index 000000000..47598c165 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-3-1.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-3-1.js
+ * @description eval allowed as function identifier in non-strict function declaration
+ */
+
+
+function testcase()
+{
+ try
+ {
+ eval("function eval(){};");
+ return true;
+ }
+ catch (e) { }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-3-2.js b/js/src/tests/test262/ch13/13.1/13.1-3-2.js new file mode 100644 index 000000000..598e3faf6 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-3-2.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-3-2.js
+ * @description eval allowed as function identifier in non-strict function expression
+ */
+
+
+function testcase()
+{
+ try
+ {
+ eval("(function eval(){});");
+ return true;
+ }
+ catch (e) { }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-3-7.js b/js/src/tests/test262/ch13/13.1/13.1-3-7.js new file mode 100644 index 000000000..c6bbd159c --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-3-7.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-3-7.js
+ * @description arguments allowed as function identifier in non-strict function declaration
+ */
+
+
+function testcase()
+{
+ try
+ {
+ eval("function arguments (){};");
+ return true;
+ }
+ catch (e) { }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-3-8.js b/js/src/tests/test262/ch13/13.1/13.1-3-8.js new file mode 100644 index 000000000..cd9ef9a2a --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-3-8.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-3-8.js
+ * @description arguments allowed as function identifier in non-strict function expression
+ */
+
+
+function testcase()
+{
+ try
+ {
+ eval("(function arguments (){});");
+ return true;
+ }
+ catch (e) { }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-3-s.js b/js/src/tests/test262/ch13/13.1/13.1-3-s.js new file mode 100644 index 000000000..ecc0385ea --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-3-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-3-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("function _13_1_3_fun(arguments) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-30-s.js b/js/src/tests/test262/ch13/13.1/13.1-30-s.js new file mode 100644 index 000000000..b07291c1d --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-30-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-30-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression whose FunctionBody is contained in strict code and the function has two identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("var _13_1_30_fun = function (param, param) { 'use strict'; };");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-31-s.js b/js/src/tests/test262/ch13/13.1/13.1-31-s.js new file mode 100644 index 000000000..1e47d2acf --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-31-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-31-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression that is contained in eval strict code and the function has two identical parameters, which are separated by a unique parameter name
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-32-s.js b/js/src/tests/test262/ch13/13.1/13.1-32-s.js new file mode 100644 index 000000000..b1a4ef8b1 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-32-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-32-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression whose FunctionBody is strict and the function has two identical parameters, which are separated by a unique parameter name
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("var _13_1_32_fun = function (param1, param2, param1) { 'use strict'; };");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-33-s.js b/js/src/tests/test262/ch13/13.1/13.1-33-s.js new file mode 100644 index 000000000..bcffbd023 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-33-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-33-s.js
+ * @description Strict Mode - SyntaxError is thrown if function is created using a FunctionExpression that is contained in eval strict code and the function has three identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; var _13_1_33_fun = function (param, param, param) { };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-34-s.js b/js/src/tests/test262/ch13/13.1/13.1-34-s.js new file mode 100644 index 000000000..aca13ea5d --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-34-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-34-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function declaration has three identical parameters with a strict mode body
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("var _13_1_34_fun = function (param, param, param) { 'use strict'; };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-35-s.js b/js/src/tests/test262/ch13/13.1/13.1-35-s.js new file mode 100644 index 000000000..ebe7e71f2 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-35-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-35-s.js
+ * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration in strict eval code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; function eval() { };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-36-s.js b/js/src/tests/test262/ch13/13.1/13.1-36-s.js new file mode 100644 index 000000000..63d08a282 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-36-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-36-s.js
+ * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration whose FunctionBody is in strict mode
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("function eval() { 'use strict'; };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-37-s.js b/js/src/tests/test262/ch13/13.1/13.1-37-s.js new file mode 100644 index 000000000..c2f27c0f1 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-37-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-37-s.js
+ * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression in strict eval code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ var _13_1_37_s = {};
+ try {
+ eval("'use strict'; _13_1_37_s.x = function eval() {};");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-38-s.js b/js/src/tests/test262/ch13/13.1/13.1-38-s.js new file mode 100644 index 000000000..5d73e72c3 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-38-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-38-s.js
+ * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression whose FunctionBody is contained in strict code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ var _13_1_38_s = {};
+ try {
+ eval("_13_1_38_s.x = function eval() {'use strict'; };");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-39-s.js b/js/src/tests/test262/ch13/13.1/13.1-39-s.js new file mode 100644 index 000000000..54eb5ee03 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-39-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-39-s.js
+ * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the function name of a FunctionDeclaration in strict eval code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("'use strict'; function arguments() { };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-4-s.js b/js/src/tests/test262/ch13/13.1/13.1-4-s.js new file mode 100644 index 000000000..ba0c1cee4 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-4-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList
+ * of a strict mode FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-4-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var _13_1_4_fun = function (arguments) { };");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-40-s.js b/js/src/tests/test262/ch13/13.1/13.1-40-s.js new file mode 100644 index 000000000..42d7bcbba --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-40-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-40-s.js
+ * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionDeclaration whose FunctionBody is contained in strict code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ eval("function arguments() { 'use strict'; };")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-41-s.js b/js/src/tests/test262/ch13/13.1/13.1-41-s.js new file mode 100644 index 000000000..9a9a3ca2b --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-41-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-41-s.js
+ * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression in strict eval code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ var _13_1_41_s = {};
+ try {
+ eval("'use strict'; _13_1_41_s.x = function arguments() {};");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-42-s.js b/js/src/tests/test262/ch13/13.1/13.1-42-s.js new file mode 100644 index 000000000..f19d56c98 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-42-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-42-s.js
+ * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression whose FunctionBody is contained in strict code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ var _13_1_42_s = {};
+ try {
+ eval("_13_1_42_s.x = function arguments() {'use strict';};");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-4gs.js b/js/src/tests/test262/ch13/13.1/13.1-4gs.js new file mode 100644 index 000000000..0c501018a --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-4gs.js @@ -0,0 +1,14 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-4gs.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+"use strict";
+throw NotEarlyError;
+var _13_1_4_fun = function (arguments) { };
\ No newline at end of file diff --git a/js/src/tests/test262/ch13/13.1/13.1-5-s.js b/js/src/tests/test262/ch13/13.1/13.1-5-s.js new file mode 100644 index 000000000..6d13ca135 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-5-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-5-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is declared in 'strict mode' using a FunctionDeclaration and the function has two identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("function _13_1_5_fun(param, param) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-5gs.js b/js/src/tests/test262/ch13/13.1/13.1-5gs.js new file mode 100644 index 000000000..709deb1e9 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-5gs.js @@ -0,0 +1,14 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-5gs.js
+ * @description Strict Mode - SyntaxError is thrown if a FunctionDeclaration has two identical parameters
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+"use strict";
+throw NotEarlyError;
+function _13_1_5_fun(param, param) { }
\ No newline at end of file diff --git a/js/src/tests/test262/ch13/13.1/13.1-6-s.js b/js/src/tests/test262/ch13/13.1/13.1-6-s.js new file mode 100644 index 000000000..10e6e7d9a --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-6-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-6-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionDeclaration and the function has two identical parameters, which are separated by a unique parameter name
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("function _13_1_6_fun(param1, param2, param1) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-7-s.js b/js/src/tests/test262/ch13/13.1/13.1-7-s.js new file mode 100644 index 000000000..087a20f7e --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-7-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-7-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionDeclaration and the function has three identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("function _13_1_7_fun(param, param, param) { }");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-8-s.js b/js/src/tests/test262/ch13/13.1/13.1-8-s.js new file mode 100644 index 000000000..eb9a3976b --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-8-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-8-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has two identical parameters
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var _13_1_8_fun = function (param, param) { };");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/13.1-8gs.js b/js/src/tests/test262/ch13/13.1/13.1-8gs.js new file mode 100644 index 000000000..f647656d9 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-8gs.js @@ -0,0 +1,14 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch13/13.1/13.1-8gs.js
+ * @description Strict Mode - SyntaxError is thrown if a FunctionExpression has two identical parameters
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+"use strict";
+throw NotEarlyError;
+var _13_1_8_fun = function (param, param) { };
\ No newline at end of file diff --git a/js/src/tests/test262/ch13/13.1/13.1-9-s.js b/js/src/tests/test262/ch13/13.1/13.1-9-s.js new file mode 100644 index 000000000..11aba0ce2 --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/13.1-9-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * Refer 13.1;
+ * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode
+ * FunctionDeclaration or FunctionExpression.
+ *
+ * @path ch13/13.1/13.1-9-s.js
+ * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has two identical parameters, which are separated by a unique parameter name
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var _13_1_9_fun = function (param1, param2, param1) { };");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch13/13.1/browser.js b/js/src/tests/test262/ch13/13.1/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/browser.js diff --git a/js/src/tests/test262/ch13/13.1/shell.js b/js/src/tests/test262/ch13/13.1/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch13/13.1/shell.js |