summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch08/8.7/8.7.2
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/ch08/8.7/8.7.2')
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-1-s.js22
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-2-s.js18
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-1-s.js19
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-a-1gs.js15
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-a-2gs.js16
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-s.js27
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-4-s.js28
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-5-s.js25
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-6-s.js24
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-7-s.js25
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-8-s.js21
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/browser.js0
-rw-r--r--js/src/tests/test262/ch08/8.7/8.7.2/shell.js0
13 files changed, 240 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-1-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-1-s.js
new file mode 100644
index 000000000..a7f5f5b2c
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-1-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 ch08/8.7/8.7.2/8.7.2-1-s.js
+ * @description Strict Mode - ReferenceError is thrown if LeftHandSide evaluates to an unresolvable Reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_8_7_2_1 = 11;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-2-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-2-s.js
new file mode 100644
index 000000000..abbfbc7fe
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-2-s.js
@@ -0,0 +1,18 @@
+/// 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 ch08/8.7/8.7.2/8.7.2-2-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if LeftHandSide evaluates to a resolvable Reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var b = 11;
+ return b === 11;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-1-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-1-s.js
new file mode 100644
index 000000000..7695a3cb8
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-1-s.js
@@ -0,0 +1,19 @@
+/// 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 ch08/8.7/8.7.2/8.7.2-3-1-s.js
+ * @description eval - a property named 'eval' is permitted
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ 'use strict';
+
+ var o = { eval: 42};
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-a-1gs.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-a-1gs.js
new file mode 100644
index 000000000..88dc77f61
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-a-1gs.js
@@ -0,0 +1,15 @@
+/// 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 ch08/8.7/8.7.2/8.7.2-3-a-1gs.js
+ * @description Strict Mode - ReferenceError is thrown if LeftHandSide evaluate to an unresolvable Reference
+ * @onlyStrict
+ * @negative .
+ */
+
+"use strict";
+b = 11;
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-a-2gs.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-a-2gs.js
new file mode 100644
index 000000000..402e7dcfb
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-a-2gs.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 ch08/8.7/8.7.2/8.7.2-3-a-2gs.js
+ * @description Strict Mode - 'runtime' error is thrown before LeftHandSide evaluates to an unresolvable Reference
+ * @onlyStrict
+ * @negative NotEarlyError
+ */
+
+"use strict";
+throw NotEarlyError;
+b = 11;
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-3-s.js
new file mode 100644
index 000000000..b61a53046
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-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.
+/**
+ * @path ch08/8.7/8.7.2/8.7.2-3-s.js
+ * @description Strict Mode - TypeError is thrown if LeftHandSide is a reference to a non-writable data property
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _8_7_2_3 = {};
+ Object.defineProperty(_8_7_2_3, "b", {
+ writable: false
+ });
+
+ try {
+ _8_7_2_3.b = 11;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-4-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-4-s.js
new file mode 100644
index 000000000..f8bb3cfc2
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-4-s.js
@@ -0,0 +1,28 @@
+/// 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 ch08/8.7/8.7.2/8.7.2-4-s.js
+ * @description Strict Mode - TypeError is thrown if LeftHandSide is a reference to an accessor property with no setter
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _8_7_2_4 = {};
+ var _8_7_2_4_bValue = 1;
+ Object.defineProperty(_8_7_2_4, "b", {
+ get: function () { return _8_7_2_4_bValue; }
+ });
+
+ try {
+ _8_7_2_4.b = 11;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-5-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-5-s.js
new file mode 100644
index 000000000..ece372934
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-5-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 ch08/8.7/8.7.2/8.7.2-5-s.js
+ * @description Strict Mode - TypeError is thrown if LeftHandSide is a reference to a non-existent property of an non-extensible object
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _8_7_2_5 = {};
+ Object.preventExtensions(_8_7_2_5);
+
+ try {
+ _8_7_2_5.b = 11;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-6-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-6-s.js
new file mode 100644
index 000000000..298485f94
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-6-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 ch08/8.7/8.7.2/8.7.2-6-s.js
+ * @description Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to a writable data property
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _8_7_2_6 = {};
+ Object.defineProperty(_8_7_2_6, "b", {
+ writable: true
+ });
+
+ _8_7_2_6.b = 11;
+
+ return _8_7_2_6.b === 11;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-7-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-7-s.js
new file mode 100644
index 000000000..bc2f19543
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-7-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 ch08/8.7/8.7.2/8.7.2-7-s.js
+ * @description Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to an accessor property with setter
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _8_7_2_7 = {};
+ var _8_7_2_7_bValue = 1;
+ Object.defineProperty(_8_7_2_7, "b", {
+ get: function () { return _8_7_2_7_bValue; },
+ set: function (value) { _8_7_2_7_bValue = value; }
+ });
+
+ _8_7_2_7.b = 11;
+ return _8_7_2_7.b === 11;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-8-s.js b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-8-s.js
new file mode 100644
index 000000000..1e69c3305
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/8.7.2-8-s.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 ch08/8.7/8.7.2/8.7.2-8-s.js
+ * @description Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to a property of an extensible object
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _8_7_2_8 = {};
+
+ _8_7_2_8.b = 11;
+
+ return _8_7_2_8.b === 11;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/browser.js b/js/src/tests/test262/ch08/8.7/8.7.2/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/browser.js
diff --git a/js/src/tests/test262/ch08/8.7/8.7.2/shell.js b/js/src/tests/test262/ch08/8.7/8.7.2/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch08/8.7/8.7.2/shell.js