diff options
Diffstat (limited to 'js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1')
8 files changed, 93 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js new file mode 100644 index 000000000..bfc1f5ece --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-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 ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js
+ * @description Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (NaN)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ NaN = 12;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js new file mode 100644 index 000000000..e60836978 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-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 ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js
+ * @description Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (undefined)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ undefined = 12;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js new file mode 100644 index 000000000..9303b79b5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-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 ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js
+ * @description Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Object)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var objBak = Object;
+
+ try {
+ Object = 12;
+ return true;
+ } finally {
+ Object = objBak;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js new file mode 100644 index 000000000..9ecdf64a5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-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 ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js
+ * @description Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Number)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ var numBak = Number;
+ try {
+ Number = 12;
+ return true;
+ } finally {
+ Number = numBak;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js |