summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch12/12.14/12.14.1
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/ch12/12.14/12.14.1')
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-1-s.js25
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-1gs.js16
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-2-s.js25
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-3-s.js33
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-4-s.js23
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-5-s.js23
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-6-s.js23
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/browser.js0
-rw-r--r--js/src/tests/test262/ch12/12.14/12.14.1/shell.js0
9 files changed, 168 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-1-s.js b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-1-s.js
new file mode 100644
index 000000000..894a13501
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-1-s.js
@@ -0,0 +1,25 @@
+/// 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 ch12/12.14/12.14.1/12.14.1-1-s.js
+ * @description Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is eval
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("\
+ try {} catch (eval) { }\
+ ");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-1gs.js b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-1gs.js
new file mode 100644
index 000000000..04708c31e
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-1gs.js
@@ -0,0 +1,16 @@
+/// 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 ch12/12.14/12.14.1/12.14.1-1gs.js
+ * @description Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is eval
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+
+"use strict";
+throw NotEarlyError;
+try { } catch (eval) { }
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-2-s.js b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-2-s.js
new file mode 100644
index 000000000..b0e660bd0
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-2-s.js
@@ -0,0 +1,25 @@
+/// 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 ch12/12.14/12.14.1/12.14.1-2-s.js
+ * @description Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is arguments
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("\
+ try {} catch (arguments) { }\
+ ");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-3-s.js b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-3-s.js
new file mode 100644
index 000000000..3c477785b
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-3-s.js
@@ -0,0 +1,33 @@
+/// 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 ch12/12.14/12.14.1/12.14.1-3-s.js
+ * @description Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is EVAL but throws SyntaxError if it is eval
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try{ eval(" try { \
+ throw new Error(\"...\");\
+ return false;\
+ } catch (EVAL) {\
+ try\
+ {\
+ throw new Error(\"...\");\
+ }catch(eval)\
+ {\
+ return EVAL instanceof Error;\
+ }\
+ }");
+ return false;
+ } catch(e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-4-s.js b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-4-s.js
new file mode 100644
index 000000000..58f372cba
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-4-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 ch12/12.14/12.14.1/12.14.1-4-s.js
+ * @description Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is EVAL
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ throw new Error("...");
+ return false;
+ } catch (EVAL) {
+ return EVAL instanceof Error;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-5-s.js b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-5-s.js
new file mode 100644
index 000000000..84e85593a
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-5-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 ch12/12.14/12.14.1/12.14.1-5-s.js
+ * @description Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is Arguments
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ throw new Error("...");
+ return false;
+ } catch (Arguments) {
+ return Arguments instanceof Error;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-6-s.js b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-6-s.js
new file mode 100644
index 000000000..edd8bb558
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/12.14.1-6-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 ch12/12.14/12.14.1/12.14.1-6-s.js
+ * @description Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is ARGUMENTS
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ throw new Error("...");
+ return false;
+ } catch (ARGUMENTS) {
+ return ARGUMENTS instanceof Error;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/browser.js b/js/src/tests/test262/ch12/12.14/12.14.1/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/browser.js
diff --git a/js/src/tests/test262/ch12/12.14/12.14.1/shell.js b/js/src/tests/test262/ch12/12.14/12.14.1/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.14/12.14.1/shell.js