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/ch12/12.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/ch12/12.1')
-rw-r--r-- | js/src/tests/test262/ch12/12.1/12.1-1.js | 20 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/12.1-2.js | 20 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/12.1-3.js | 20 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/12.1-4.js | 20 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/12.1-5.js | 20 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/12.1-6.js | 20 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/12.1-7.js | 20 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/S12.1_A2.js | 37 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/S12.1_A4_T1.js | 19 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/S12.1_A4_T2.js | 19 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/S12.1_A5.js | 57 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/browser.js | 0 | ||||
-rw-r--r-- | js/src/tests/test262/ch12/12.1/shell.js | 0 |
13 files changed, 272 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch12/12.1/12.1-1.js b/js/src/tests/test262/ch12/12.1/12.1-1.js new file mode 100644 index 000000000..e5311368f --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/12.1-1.js @@ -0,0 +1,20 @@ +/// 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.1/12.1-1.js
+ * @description 12.1 - block '{ StatementListopt };' is not allowed: try-catch
+ */
+
+
+function testcase() {
+ try {
+ eval("try{};catch(){}");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.1/12.1-2.js b/js/src/tests/test262/ch12/12.1/12.1-2.js new file mode 100644 index 000000000..ab1d4668e --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/12.1-2.js @@ -0,0 +1,20 @@ +/// 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.1/12.1-2.js
+ * @description 12.1 - block '{ StatementListopt };' is not allowed: try-catch-finally
+ */
+
+
+function testcase() {
+ try {
+ eval("try{};catch{};finally{}");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.1/12.1-3.js b/js/src/tests/test262/ch12/12.1/12.1-3.js new file mode 100644 index 000000000..e0ccd4f58 --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/12.1-3.js @@ -0,0 +1,20 @@ +/// 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.1/12.1-3.js
+ * @description 12.1 - block '{ StatementListopt };' is not allowed: try-finally
+ */
+
+
+function testcase() {
+ try {
+ eval("try{};finally{}");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.1/12.1-4.js b/js/src/tests/test262/ch12/12.1/12.1-4.js new file mode 100644 index 000000000..4df0c5604 --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/12.1-4.js @@ -0,0 +1,20 @@ +/// 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.1/12.1-4.js
+ * @description 12.1 - block '{ StatementListopt };' is not allowed: if-else
+ */
+
+
+function testcase() {
+ try {
+ eval("if{};else{}");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.1/12.1-5.js b/js/src/tests/test262/ch12/12.1/12.1-5.js new file mode 100644 index 000000000..4d2238962 --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/12.1-5.js @@ -0,0 +1,20 @@ +/// 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.1/12.1-5.js
+ * @description 12.1 - block '{ StatementListopt };' is not allowed: if-else-if
+ */
+
+
+function testcase() {
+ try {
+ eval("if{};else if{}");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.1/12.1-6.js b/js/src/tests/test262/ch12/12.1/12.1-6.js new file mode 100644 index 000000000..d6907d9c6 --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/12.1-6.js @@ -0,0 +1,20 @@ +/// 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.1/12.1-6.js
+ * @description 12.1 - block '{ StatementListopt };' is not allowed: if-else-if-else
+ */
+
+
+function testcase() {
+ try {
+ eval("if{};else if{};else{}");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.1/12.1-7.js b/js/src/tests/test262/ch12/12.1/12.1-7.js new file mode 100644 index 000000000..ab89adc8b --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/12.1-7.js @@ -0,0 +1,20 @@ +/// 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.1/12.1-7.js
+ * @description 12.1 - block '{ StatementListopt };' is not allowed: do-while
+ */
+
+
+function testcase() {
+ try {
+ eval("do{};while()");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.1/S12.1_A2.js b/js/src/tests/test262/ch12/12.1/S12.1_A2.js new file mode 100644 index 000000000..eed2e89d4 --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/S12.1_A2.js @@ -0,0 +1,37 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production StatementList Statement is evaluated as follows + * 1. Evaluate Statement. + * 2. If an exception was thrown, return (throw, V, empty) where V is the exception + * + * @path ch12/12.1/S12.1_A2.js + * @description Throwing exception within a Block + */ + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +try { + x(); + $ERROR('#1: "x()" lead to throwing exception'); +} catch (e) { + $PRINT(e.message); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +try { + throw "catchme"; + $ERROR('#2: throw "catchme" lead to throwing exception'); +} catch (e) { + if (e!=="catchme") { + $ERROR('#2.1: Exception === "catchme". Actual: Exception ==='+ e ); + } +} + +// +////////////////////////////////////////////////////////////////////////////// + diff --git a/js/src/tests/test262/ch12/12.1/S12.1_A4_T1.js b/js/src/tests/test262/ch12/12.1/S12.1_A4_T1.js new file mode 100644 index 000000000..8acad6f1c --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/S12.1_A4_T1.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production Block can't be inside of expression + * + * @path ch12/12.1/S12.1_A4_T1.js + * @description Checking if execution of "y={__func}()" fails + * @negative + */ + +function __func(){}; + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +y={__func}(); +// +////////////////////////////////////////////////////////////////////////////// + diff --git a/js/src/tests/test262/ch12/12.1/S12.1_A4_T2.js b/js/src/tests/test262/ch12/12.1/S12.1_A4_T2.js new file mode 100644 index 000000000..510d6f7b0 --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/S12.1_A4_T2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production Block can't be inside of expression + * + * @path ch12/12.1/S12.1_A4_T2.js + * @description Checking if execution of "y={x}" fails + * @negative + */ + +x=1; + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +y={x}; +// +////////////////////////////////////////////////////////////////////////////// + diff --git a/js/src/tests/test262/ch12/12.1/S12.1_A5.js b/js/src/tests/test262/ch12/12.1/S12.1_A5.js new file mode 100644 index 000000000..00356061f --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/S12.1_A5.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * StatementList: StatementList Statement inside the Block is evaluated from left to right + * + * @path ch12/12.1/S12.1_A5.js + * @description Throwing exceptions within embedded/sequence Blocks + */ + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +try { + throw 1; + throw 2; + throw 3; + $ERROR('1.1: throw 1 lead to throwing exception'); +} catch (e) { + if (e!==1) { + $ERROR('#1.2: Exception === 1. Actual: Exception ==='+ e); + } +} +//////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +try { + { + throw 1; + throw 2; + } + throw 3; + $ERROR('#2.1: throw 1 lead to throwing exception'); +} catch (e) { + if (e!==1) { + $ERROR('#2.2: Exception === 1. Actual: Exception ==='+ e); + } +} +//////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#3 +try { + throw 1; + { + throw 2; + throw 3; + } + $ERROR('#3.1: throw 1 lead to throwing exception'); +} catch (e) { + if (e!==1) { + $ERROR('#3.2: Exception === 1. Actual: Exception ==='+ e); + } +} +//////////////////////////////////////////////////////////////////////////////// + + diff --git a/js/src/tests/test262/ch12/12.1/browser.js b/js/src/tests/test262/ch12/12.1/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/browser.js diff --git a/js/src/tests/test262/ch12/12.1/shell.js b/js/src/tests/test262/ch12/12.1/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch12/12.1/shell.js |