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/ch07/7.6 | |
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/ch07/7.6')
279 files changed, 7763 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch07/7.6/7.6-1.js b/js/src/tests/test262/ch07/7.6/7.6-1.js new file mode 100644 index 000000000..b4bc37326 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-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 ch07/7.6/7.6-1.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: null (null)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u006eull = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-10.js b/js/src/tests/test262/ch07/7.6/7.6-10.js new file mode 100644 index 000000000..36e6ea699 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-10.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 ch07/7.6/7.6-10.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: new (new)
+ */
+
+
+function testcase() {
+ try {
+ eval("var n\u0065w = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-11.js b/js/src/tests/test262/ch07/7.6/7.6-11.js new file mode 100644 index 000000000..4e5fee3be --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-11.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 ch07/7.6/7.6-11.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: var (var)
+ */
+
+
+function testcase() {
+ try {
+ eval("var va\u0072 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-12.js b/js/src/tests/test262/ch07/7.6/7.6-12.js new file mode 100644 index 000000000..3d939c8a9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-12.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 ch07/7.6/7.6-12.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: try (try)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0074\u0072\u0079 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-13.js b/js/src/tests/test262/ch07/7.6/7.6-13.js new file mode 100644 index 000000000..bde18e099 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-13.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 ch07/7.6/7.6-13.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: catch (catch)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0063atch = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-14.js b/js/src/tests/test262/ch07/7.6/7.6-14.js new file mode 100644 index 000000000..d9c6d794f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-14.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 ch07/7.6/7.6-14.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: finally (finally)
+ */
+
+
+function testcase() {
+ try {
+ eval("var fina\u006cly = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-15.js b/js/src/tests/test262/ch07/7.6/7.6-15.js new file mode 100644 index 000000000..b2f034760 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-15.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 ch07/7.6/7.6-15.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: return (return)
+ */
+
+
+function testcase() {
+ try {
+ eval("var retur\u006e = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-16.js b/js/src/tests/test262/ch07/7.6/7.6-16.js new file mode 100644 index 000000000..ba98c547b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-16.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 ch07/7.6/7.6-16.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: void (void)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0076\u006f\u0069\u0064 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-17.js b/js/src/tests/test262/ch07/7.6/7.6-17.js new file mode 100644 index 000000000..93a309cbd --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-17.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 ch07/7.6/7.6-17.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: continue (continue)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0063ontinue = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-18.js b/js/src/tests/test262/ch07/7.6/7.6-18.js new file mode 100644 index 000000000..aba469e60 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-18.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 ch07/7.6/7.6-18.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: for (for)
+ */
+
+
+function testcase() {
+ try {
+ eval("var f\u006fr = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-19.js b/js/src/tests/test262/ch07/7.6/7.6-19.js new file mode 100644 index 000000000..b6df7be44 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-19.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 ch07/7.6/7.6-19.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: switch (switch)
+ */
+
+
+function testcase() {
+ try {
+ eval("var switc\u0068 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-2.js b/js/src/tests/test262/ch07/7.6/7.6-2.js new file mode 100644 index 000000000..c6ecd7172 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-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 ch07/7.6/7.6-2.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: true (true)
+ */
+
+
+function testcase() {
+ try {
+ eval("var tr\u0075e = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-20.js b/js/src/tests/test262/ch07/7.6/7.6-20.js new file mode 100644 index 000000000..1eefcf064 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-20.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 ch07/7.6/7.6-20.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: while (while)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0077\u0068\u0069\u006c\u0065 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-21.js b/js/src/tests/test262/ch07/7.6/7.6-21.js new file mode 100644 index 000000000..c1cc483ec --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-21.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 ch07/7.6/7.6-21.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: debugger (debugger)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0064ebugger = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-22.js b/js/src/tests/test262/ch07/7.6/7.6-22.js new file mode 100644 index 000000000..a050ca989 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-22.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 ch07/7.6/7.6-22.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: function (function)
+ */
+
+
+function testcase() {
+ try {
+ eval("var func\u0074ion = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-23.js b/js/src/tests/test262/ch07/7.6/7.6-23.js new file mode 100644 index 000000000..df98f3815 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-23.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 ch07/7.6/7.6-23.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: this (this)
+ */
+
+
+function testcase() {
+ try {
+ eval("var thi\u0073 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-24.js b/js/src/tests/test262/ch07/7.6/7.6-24.js new file mode 100644 index 000000000..d5773ebf2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-24.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 ch07/7.6/7.6-24.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: if (if)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0069\u0066 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-25.js b/js/src/tests/test262/ch07/7.6/7.6-25.js new file mode 100644 index 000000000..ff25f3e02 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-25.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 ch07/7.6/7.6-25.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: with (with)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0077ith = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-26.js b/js/src/tests/test262/ch07/7.6/7.6-26.js new file mode 100644 index 000000000..c740431cb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-26.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 ch07/7.6/7.6-26.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: default (default)
+ */
+
+
+function testcase() {
+ try {
+ eval("var def\u0061ult = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-27.js b/js/src/tests/test262/ch07/7.6/7.6-27.js new file mode 100644 index 000000000..e51bb26d8 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-27.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 ch07/7.6/7.6-27.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: throw (throw)
+ */
+
+
+function testcase() {
+ try {
+ eval("var thro\u0077 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-28.js b/js/src/tests/test262/ch07/7.6/7.6-28.js new file mode 100644 index 000000000..8f4dd26cf --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-28.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 ch07/7.6/7.6-28.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: in (in)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0069\u006e = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-29.js b/js/src/tests/test262/ch07/7.6/7.6-29.js new file mode 100644 index 000000000..9e97c02ba --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-29.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 ch07/7.6/7.6-29.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: delete (delete)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0064elete = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-3.js b/js/src/tests/test262/ch07/7.6/7.6-3.js new file mode 100644 index 000000000..d14357042 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-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 ch07/7.6/7.6-3.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: false (false)
+ */
+
+
+function testcase() {
+ try {
+ eval("var fals\u0065 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-30.js b/js/src/tests/test262/ch07/7.6/7.6-30.js new file mode 100644 index 000000000..6e4af63b4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-30.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 ch07/7.6/7.6-30.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: class (class)
+ */
+
+
+function testcase() {
+ try {
+ eval("var cla\u0073s = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-31.js b/js/src/tests/test262/ch07/7.6/7.6-31.js new file mode 100644 index 000000000..c9fb1089e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-31.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 ch07/7.6/7.6-31.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: extends (extends)
+ */
+
+
+function testcase() {
+ try {
+ eval("var extend\u0073 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-32.js b/js/src/tests/test262/ch07/7.6/7.6-32.js new file mode 100644 index 000000000..86ea96417 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-32.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 ch07/7.6/7.6-32.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: enum (enum)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0065\u006e\u0075\u006d = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-33.js b/js/src/tests/test262/ch07/7.6/7.6-33.js new file mode 100644 index 000000000..3d6c8dbe3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-33.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 ch07/7.6/7.6-33.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: super (super)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0073uper = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-34.js b/js/src/tests/test262/ch07/7.6/7.6-34.js new file mode 100644 index 000000000..391fa0191 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-34.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 ch07/7.6/7.6-34.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: const (const)
+ */
+
+
+function testcase() {
+ try {
+ eval("var co\u006est = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-35.js b/js/src/tests/test262/ch07/7.6/7.6-35.js new file mode 100644 index 000000000..5a729ad00 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-35.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 ch07/7.6/7.6-35.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: export (export)
+ */
+
+
+function testcase() {
+ try {
+ eval("var expor\u0074 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-36.js b/js/src/tests/test262/ch07/7.6/7.6-36.js new file mode 100644 index 000000000..afc680a0e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-36.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 ch07/7.6/7.6-36.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: import (import)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0069\u006d\u0070\u006f\u0072\u0074 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-4.js b/js/src/tests/test262/ch07/7.6/7.6-4.js new file mode 100644 index 000000000..b621b8d7e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-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 ch07/7.6/7.6-4.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: break (break)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0062\u0072\u0065\u0061\u006b = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-5.js b/js/src/tests/test262/ch07/7.6/7.6-5.js new file mode 100644 index 000000000..5889b2fc6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-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 ch07/7.6/7.6-5.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: case (case)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0063ase = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-6.js b/js/src/tests/test262/ch07/7.6/7.6-6.js new file mode 100644 index 000000000..d70805344 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-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 ch07/7.6/7.6-6.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: instanceof (instanceof)
+ */
+
+
+function testcase() {
+ try {
+ eval("var insta\u006eceof = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-7.js b/js/src/tests/test262/ch07/7.6/7.6-7.js new file mode 100644 index 000000000..f388e1302 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-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 ch07/7.6/7.6-7.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: typeof (typeof)
+ */
+
+
+function testcase() {
+ try {
+ eval("var typeo\u0066 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-8.js b/js/src/tests/test262/ch07/7.6/7.6-8.js new file mode 100644 index 000000000..ab4f25978 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-8.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 ch07/7.6/7.6-8.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: do (do)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0064\u006f = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6-9.js b/js/src/tests/test262/ch07/7.6/7.6-9.js new file mode 100644 index 000000000..2e9f07b03 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6-9.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 ch07/7.6/7.6-9.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: else (else) (null)
+ */
+
+
+function testcase() {
+ try {
+ eval("var \u0065lse = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-1.js new file mode 100644 index 000000000..20be0698f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-1.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-1.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: null, true, false
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ null: 0,
+ true: 1,
+ false: 2
+ };
+ var arr = [
+ 'null',
+ 'true',
+ 'false'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-10.js new file mode 100644 index 000000000..08f1d0026 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-10.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-10.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: in, try, class
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ in: 0,
+ try: 1,
+ class: 2
+ };
+ var arr = [
+ 'in',
+ 'try',
+ 'class'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-11.js new file mode 100644 index 000000000..6875887d9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-11.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-11.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: enum, extends, super
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ enum: 0,
+ extends: 1,
+ super: 2
+ };
+ var arr = [
+ 'enum',
+ 'extends',
+ 'super'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-12.js new file mode 100644 index 000000000..52940898d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-12.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-12.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: const, export, import
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ const: 0,
+ export: 1,
+ import: 2
+ };
+ var arr = [
+ 'const',
+ 'export',
+ 'import'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-13.js new file mode 100644 index 000000000..d35543629 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-13.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-13.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: implements, let, private
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ implements: 0,
+ let: 1,
+ private: 2
+ };
+ var arr = [
+ 'implements',
+ 'let',
+ 'private'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-14.js new file mode 100644 index 000000000..6d9270d3e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-14.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-14.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: public, yield, interface
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ public: 0,
+ yield: 1,
+ interface: 2
+ };
+ var arr = [
+ 'public',
+ 'yield',
+ 'interface'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-15.js new file mode 100644 index 000000000..4585126a0 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-15.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-15.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: package, protected, static
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ package: 0,
+ protected: 1,
+ static: 2
+ };
+ var arr = [
+ 'package',
+ 'protected',
+ 'static'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-16.js new file mode 100644 index 000000000..20b61eccf --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-16.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-16.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: undeefined, NaN, Infinity
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ undefined: 0,
+ NaN: 1,
+ Infinity: 2
+ };
+ var arr = [
+ 'undefined',
+ 'NaN',
+ 'Infinity'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-2.js new file mode 100644 index 000000000..8b0ca79ea --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-2.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-2.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: break, case, do
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ break: 0,
+ case: 1,
+ do: 2
+ };
+ var arr = [
+ 'break',
+ 'case',
+ 'do'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-3.js new file mode 100644 index 000000000..5254fdfa3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-3.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-3.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: instanceof, typeof, else
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ instanceof: 0,
+ typeof: 1,
+ else: 2
+ };
+ var arr = [
+ 'instanceof',
+ 'typeof',
+ 'else'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-4.js new file mode 100644 index 000000000..5391b5be8 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-4.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-4.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: new, var, catch
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ new: 0,
+ var: 1,
+ catch: 2
+ };
+ var arr = [
+ 'new',
+ 'var',
+ 'catch'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-5.js new file mode 100644 index 000000000..cc65a2bd2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-5.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-5.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: finally, return, void
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ finally: 0,
+ return: 1,
+ void: 2
+ };
+ var arr = [
+ 'finally',
+ 'return',
+ 'void'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-6.js new file mode 100644 index 000000000..157b2fec9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-6.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-6.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: continue, for, switch
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ continue: 0,
+ for: 1,
+ switch: 2
+ };
+ var arr = [
+ 'continue',
+ 'for',
+ 'switch'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-7.js new file mode 100644 index 000000000..227e58d5a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-7.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-7.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: while, debugger, function
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ while: 0,
+ debugger: 1,
+ function: 2
+ };
+ var arr = [
+ 'while' ,
+ 'debugger',
+ 'function'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-8.js new file mode 100644 index 000000000..0045ead1d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-8.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-8.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: this, with, default
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ this: 0,
+ with: 1,
+ default: 2
+ };
+ var arr = [
+ 'this',
+ 'with',
+ 'default'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-9.js new file mode 100644 index 000000000..285d14ec9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-1-9.js @@ -0,0 +1,34 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-1-9.js
+ * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: if, throw, delete
+ */
+
+
+function testcase(){
+ var tokenCodes = {
+ if: 0,
+ throw: 1,
+ delete: 2
+ };
+ var arr = [
+ 'if',
+ 'throw',
+ 'delete'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-1.js new file mode 100644 index 000000000..d652a22a4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-1.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 ch07/7.6/7.6.1/7.6.1-2-1.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: null, true, false
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.null = 0;
+ tokenCodes.true = 1;
+ tokenCodes.false = 2;
+ var arr = [
+ 'null',
+ 'true',
+ 'false'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-10.js new file mode 100644 index 000000000..2d8ed66f1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-10.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 ch07/7.6/7.6.1/7.6.1-2-10.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: in, try, class
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.in = 0;
+ tokenCodes.try = 1;
+ tokenCodes.class = 2;
+ var arr = [
+ 'in',
+ 'try',
+ 'class'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-11.js new file mode 100644 index 000000000..2185f2de0 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-11.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 ch07/7.6/7.6.1/7.6.1-2-11.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: enum, extends, super
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.enum = 0;
+ tokenCodes.extends = 1;
+ tokenCodes.super = 2;
+ var arr = [
+ 'enum',
+ 'extends',
+ 'super'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-12.js new file mode 100644 index 000000000..622ec9067 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-12.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 ch07/7.6/7.6.1/7.6.1-2-12.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: const, export, import
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.const = 0;
+ tokenCodes.export = 1;
+ tokenCodes.import = 2;
+ var arr = [
+ 'const',
+ 'export',
+ 'import'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-13.js new file mode 100644 index 000000000..169cbc798 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-13.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 ch07/7.6/7.6.1/7.6.1-2-13.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: implements, let, private
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.implements = 0;
+ tokenCodes.let = 1;
+ tokenCodes.private = 2;
+ var arr = [
+ 'implements',
+ 'let',
+ 'private'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-14.js new file mode 100644 index 000000000..3343b2670 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-14.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 ch07/7.6/7.6.1/7.6.1-2-14.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: public, yield, interface
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.public = 0;
+ tokenCodes.yield = 1;
+ tokenCodes.interface = 2;
+ var arr = [
+ 'public',
+ 'yield',
+ 'interface'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-15.js new file mode 100644 index 000000000..ce04d2900 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-15.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 ch07/7.6/7.6.1/7.6.1-2-15.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: package, protected, static
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.package = 0;
+ tokenCodes.protected = 1;
+ tokenCodes.static = 2;
+ var arr = [
+ 'package',
+ 'protected',
+ 'static'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-16.js new file mode 100644 index 000000000..e078859fc --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-16.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 ch07/7.6/7.6.1/7.6.1-2-16.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: undefined, NaN, Infinity
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.undefined = 0;
+ tokenCodes.NaN = 1;
+ tokenCodes.Infinity = 2;
+ var arr = [
+ 'undefined',
+ 'NaN',
+ 'Infinity'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-2.js new file mode 100644 index 000000000..3a8997852 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-2.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 ch07/7.6/7.6.1/7.6.1-2-2.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: break, case, do
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.break = 0;
+ tokenCodes.case = 1;
+ tokenCodes.do = 2;
+ var arr = [
+ 'break',
+ 'case',
+ 'do'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-3.js new file mode 100644 index 000000000..30e4bc139 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-3.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 ch07/7.6/7.6.1/7.6.1-2-3.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: instanceof, typeof, else
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.instanceof = 0;
+ tokenCodes.typeof = 1;
+ tokenCodes.else = 2;
+ var arr = [
+ 'instanceof',
+ 'typeof',
+ 'else'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-4.js new file mode 100644 index 000000000..0d43d0373 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-4.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 ch07/7.6/7.6.1/7.6.1-2-4.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: new, var, catch
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.new = 0;
+ tokenCodes.var = 1;
+ tokenCodes.catch = 2;
+ var arr = [
+ 'new',
+ 'var',
+ 'catch'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-5.js new file mode 100644 index 000000000..542175c02 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-5.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 ch07/7.6/7.6.1/7.6.1-2-5.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: finally, return, void
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.finally = 0;
+ tokenCodes.return = 1;
+ tokenCodes.void = 2;
+ var arr = [
+ 'finally',
+ 'return',
+ 'void'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-6.js new file mode 100644 index 000000000..20a949a70 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-6.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 ch07/7.6/7.6.1/7.6.1-2-6.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: continue, for, switch
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.continue = 0;
+ tokenCodes.for = 1;
+ tokenCodes.switch = 2;
+ var arr = [
+ 'continue',
+ 'for',
+ 'switch'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-7.js new file mode 100644 index 000000000..83f526468 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-7.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 ch07/7.6/7.6.1/7.6.1-2-7.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: while, debugger, function
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.while = 0;
+ tokenCodes.debugger = 1;
+ tokenCodes.function = 2;
+ var arr = [
+ 'while' ,
+ 'debugger',
+ 'function'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-8.js new file mode 100644 index 000000000..62e39d18a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-8.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 ch07/7.6/7.6.1/7.6.1-2-8.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: this, with, default
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.this = 0;
+ tokenCodes.with = 1;
+ tokenCodes.default = 2;
+ var arr = [
+ 'this',
+ 'with',
+ 'default'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-9.js new file mode 100644 index 000000000..99678952f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-2-9.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 ch07/7.6/7.6.1/7.6.1-2-9.js
+ * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: if, throw, delete
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.if = 0;
+ tokenCodes.throw = 1;
+ tokenCodes.delete = 2;
+ var arr = [
+ 'if',
+ 'throw',
+ 'delete'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-1.js new file mode 100644 index 000000000..7f890eb5d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-1.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 ch07/7.6/7.6.1/7.6.1-3-1.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: null, true, false
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['null'] = 0;
+ tokenCodes['true'] = 1;
+ tokenCodes['false'] = 2;
+ var arr = [
+ 'null',
+ 'true',
+ 'false'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-10.js new file mode 100644 index 000000000..83dddc14e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-10.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 ch07/7.6/7.6.1/7.6.1-3-10.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: in, try, class
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['in'] = 0;
+ tokenCodes['try'] = 1;
+ tokenCodes['class'] = 2;
+ var arr = [
+ 'in',
+ 'try',
+ 'class'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-11.js new file mode 100644 index 000000000..4b1f58b41 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-11.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 ch07/7.6/7.6.1/7.6.1-3-11.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: enum, extends, super
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['enum'] = 0;
+ tokenCodes['extends'] = 1;
+ tokenCodes['super'] = 2;
+ var arr = [
+ 'enum',
+ 'extends',
+ 'super'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-12.js new file mode 100644 index 000000000..72cc76dbe --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-12.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 ch07/7.6/7.6.1/7.6.1-3-12.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: const, export, import
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['const'] = 0;
+ tokenCodes['export'] = 1;
+ tokenCodes['import'] = 2;
+ var arr = [
+ 'const',
+ 'export',
+ 'import'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-13.js new file mode 100644 index 000000000..6bd557357 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-13.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 ch07/7.6/7.6.1/7.6.1-3-13.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: implements, let, private
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['implements'] = 0;
+ tokenCodes['let'] = 1;
+ tokenCodes['private'] = 2;
+ var arr = [
+ 'implements',
+ 'let',
+ 'private'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-14.js new file mode 100644 index 000000000..b70990d6c --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-14.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 ch07/7.6/7.6.1/7.6.1-3-14.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: public, yield, interface
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['public'] = 0;
+ tokenCodes['yield'] = 1;
+ tokenCodes['interface'] = 2;
+ var arr = [
+ 'public',
+ 'yield',
+ 'interface'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-15.js new file mode 100644 index 000000000..f5b7664b8 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-15.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 ch07/7.6/7.6.1/7.6.1-3-15.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: package, protected, static
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['package'] = 0;
+ tokenCodes['protected'] = 1;
+ tokenCodes['static'] = 2;
+ var arr = [
+ 'package',
+ 'protected',
+ 'static'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-16.js new file mode 100644 index 000000000..afd96393c --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-16.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 ch07/7.6/7.6.1/7.6.1-3-16.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: undefined, NaN, Infinity
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['undefined'] = 0;
+ tokenCodes['NaN'] = 1;
+ tokenCodes['Infinity'] = 2;
+ var arr = [
+ 'undefined',
+ 'NaN',
+ 'Infinity'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-2.js new file mode 100644 index 000000000..351e26392 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-2.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 ch07/7.6/7.6.1/7.6.1-3-2.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: break, case, do
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['break'] = 0;
+ tokenCodes['case'] = 1;
+ tokenCodes['do'] = 2;
+ var arr = [
+ 'break',
+ 'case',
+ 'do'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-3.js new file mode 100644 index 000000000..c756355fe --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-3.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 ch07/7.6/7.6.1/7.6.1-3-3.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: instanceof, typeof, else
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['instanceof'] = 0;
+ tokenCodes['typeof'] = 1;
+ tokenCodes['else'] = 2;
+ var arr = [
+ 'instanceof',
+ 'typeof',
+ 'else'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-4.js new file mode 100644 index 000000000..15de6619b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-4.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 ch07/7.6/7.6.1/7.6.1-3-4.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: new, var, catch
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['new'] = 0;
+ tokenCodes['var'] = 1;
+ tokenCodes['catch'] = 2;
+ var arr = [
+ 'new',
+ 'var',
+ 'catch'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-5.js new file mode 100644 index 000000000..cae2bb6e6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-5.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 ch07/7.6/7.6.1/7.6.1-3-5.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: finally, return, void
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['finally'] = 0;
+ tokenCodes['return'] = 1;
+ tokenCodes['void'] = 2;
+ var arr = [
+ 'finally',
+ 'return',
+ 'void'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-6.js new file mode 100644 index 000000000..452072295 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-6.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 ch07/7.6/7.6.1/7.6.1-3-6.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: continue, for, switch
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['continue'] = 0;
+ tokenCodes['for'] = 1;
+ tokenCodes['switch'] = 2;
+ var arr = [
+ 'continue',
+ 'for',
+ 'switch'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-7.js new file mode 100644 index 000000000..15092a0cf --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-7.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 ch07/7.6/7.6.1/7.6.1-3-7.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: while, debugger, function
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['while'] = 0;
+ tokenCodes['debugger'] = 1;
+ tokenCodes['function'] = 2;
+ var arr = [
+ 'while',
+ 'debugger',
+ 'function'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-8.js new file mode 100644 index 000000000..19db5267f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-8.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 ch07/7.6/7.6.1/7.6.1-3-8.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: this, with, default
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['this'] = 0;
+ tokenCodes['with'] = 1;
+ tokenCodes['default'] = 2;
+ var arr = [
+ 'this',
+ 'with',
+ 'default'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-9.js new file mode 100644 index 000000000..856cdb104 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-3-9.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 ch07/7.6/7.6.1/7.6.1-3-9.js
+ * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: if, throw, delete
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['if'] = 0;
+ tokenCodes['throw'] = 1;
+ tokenCodes['delete'] = 2;
+ var arr = [
+ 'if',
+ 'throw',
+ 'delete'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-1.js new file mode 100644 index 000000000..8f81d173c --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-1.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-1.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: null, true, false
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set null(value) {
+ test0 = value;
+ },
+ get null() {
+ return test0;
+ },
+ set true(value) {
+ test1 = value;
+ },
+ get true() {
+ return test1;
+ },
+ set false(value) {
+ test2 = value;
+ },
+ get false(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'null',
+ 'true',
+ 'false'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-10.js new file mode 100644 index 000000000..ae2445a25 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-10.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-10.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: in, try, class
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set in(value){
+ test0 = value;
+ },
+ get in(){
+ return test0;
+ },
+ set try(value){
+ test1 = value;
+ },
+ get try(){
+ return test1
+ },
+ set class(value){
+ test2 = value;
+ },
+ get class(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'in',
+ 'try',
+ 'class'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-11.js new file mode 100644 index 000000000..081d81170 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-11.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-11.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: enum, extends, super
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set enum(value){
+ test0 = value;
+ },
+ get enum(){
+ return test0;
+ },
+ set extends(value){
+ test1 = value;
+ },
+ get extends(){
+ return test1;
+ },
+ set super(value){
+ test2 = value;
+ },
+ get super(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'enum',
+ 'extends',
+ 'super'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-12.js new file mode 100644 index 000000000..3c16683f7 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-12.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-12.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: const, export, import
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set const(value){
+ test0 = value;
+ },
+ get const(){
+ return test0;
+ },
+ set export(value){
+ test1 = value;
+ },
+ get export(){
+ return test1
+ },
+ set import(value){
+ test2 = value;
+ },
+ get import(){
+ return test2
+ }
+ };
+ var arr = [
+ 'const',
+ 'export',
+ 'import'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-13.js new file mode 100644 index 000000000..47dd6e266 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-13.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-13.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: implements, let, private
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set implements(value){
+ test0 = value;
+ },
+ get implements(){
+ return test0;
+ },
+ set let(value){
+ test1 = value;
+ },
+ get let(){
+ return test1
+ },
+ set private(value){
+ test2 = value;
+ },
+ get private(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'implements',
+ 'let',
+ 'private'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-14.js new file mode 100644 index 000000000..0d1e1aa4f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-14.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-14.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: public, yield, interface
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set public(value){
+ test0 = value;
+ },
+ get public(){
+ return test0;
+ },
+ set yield(value){
+ test1 = value;
+ },
+ get yield(){
+ return test1;
+ },
+ set interface(value){
+ test2 = value;
+ },
+ get interface(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'public',
+ 'yield',
+ 'interface'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-15.js new file mode 100644 index 000000000..111f00706 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-15.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-15.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: package, protected, static
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set package(value){
+ test0 = value;
+ },
+ get package(){
+ return test0;
+ },
+ set protected(value){
+ test1 = value;
+ },
+ get protected(){
+ return test1
+ },
+ set static(value){
+ test2 = value;
+ },
+ get static(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'package',
+ 'protected',
+ 'static'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-16.js new file mode 100644 index 000000000..0edafa8e3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-16.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-16.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: undefined, NaN, Infinity
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set undefined(value){
+ test0 = value;
+ },
+ get undefined(){
+ return test0;
+ },
+ set NaN(value){
+ test1 = value;
+ },
+ get NaN(){
+ return test1;
+ },
+ set Infinity(value){
+ test2 = value;
+ },
+ get Infinity(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'undefined',
+ 'NaN',
+ 'Infinity'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-2.js new file mode 100644 index 000000000..8569c9cea --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-2.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-2.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: break, case, do
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set break(value){
+ test0 = value;
+ },
+ get break(){
+ return test0;
+ },
+ set case(value){
+ test1 = value;
+ },
+ get case(){
+ return test1;
+ },
+ set do(value){
+ test2 = value;
+ },
+ get do(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'break',
+ 'case',
+ 'do'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-3.js new file mode 100644 index 000000000..3ef8ea7aa --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-3.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-3.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: instanceof, typeof, else
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set instanceof(value){
+ test0 = value;
+ },
+ get instanceof(){
+ return test0;
+ },
+ set typeof(value){
+ test1 = value;
+ },
+ get typeof(){
+ return test1;
+ },
+ set else(value){
+ test2 = value;
+ },
+ get else(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'instanceof',
+ 'typeof',
+ 'else'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-4.js new file mode 100644 index 000000000..afb165ed1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-4.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-4.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: new, var, catch
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set new(value){
+ test0 = value;
+ },
+ get new(){
+ return test0;
+ },
+ set var(value){
+ test1 = value;
+ },
+ get var(){
+ return test1;
+ },
+ set catch(value){
+ test2 = value;
+ },
+ get catch(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'new',
+ 'var',
+ 'catch'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-5.js new file mode 100644 index 000000000..e4c6badae --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-5.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-5.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: finally, return, void
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set finally(value){
+ test0 = value;
+ },
+ get finally(){
+ return test0;
+ },
+ set return(value){
+ test1 = value;
+ },
+ get return(){
+ return test1;
+ },
+ set void(value){
+ test2 = value;
+ },
+ get void(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'finally',
+ 'return',
+ 'void'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-6.js new file mode 100644 index 000000000..f240ded36 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-6.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-6.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: continue, for, switch
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set continue(value){
+ test0 = value;
+ },
+ get continue(){
+ return test0;
+ },
+ set for(value){
+ test1 = value;
+ },
+ get for(){
+ return test1;
+ },
+ set switch(value){
+ test2 = value;
+ },
+ get switch(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'continue',
+ 'for',
+ 'switch'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-7.js new file mode 100644 index 000000000..6134976c8 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-7.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-7.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: while, debugger, function
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set while(value){
+ test0 = value;
+ },
+ get while(){
+ return test0
+ },
+ set debugger(value){
+ test1 = value;
+ },
+ get debugger(){
+ return test1;
+ },
+ set function(value){
+ test2 = value;
+ },
+ get function(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'while' ,
+ 'debugger',
+ 'function'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-8.js new file mode 100644 index 000000000..a027cf608 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-8.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-8.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: this, with, default
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set this(value){
+ test0 = value;
+ },
+ get this(){
+ return test0;
+ },
+ set with(value){
+ test1 = value;
+ },
+ get with(){
+ return test1;
+ },
+ set default(value){
+ test2 = value;
+ },
+ get default(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'this',
+ 'with',
+ 'default'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-9.js new file mode 100644 index 000000000..1828b0d9a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-4-9.js @@ -0,0 +1,50 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-4-9.js
+ * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: if, throw, delete
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set if(value){
+ test0 = value;
+ },
+ get if(){
+ return test0;
+ },
+ set throw(value){
+ test1 = value;
+ },
+ get throw(){
+ return test1
+ },
+ set delete(value){
+ test2 = value;
+ },
+ get delete(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'if',
+ 'throw',
+ 'delete'
+ ];
+ for(var p in tokenCodes) {
+ for(var p1 in arr) {
+ if(arr[p1] === p) {
+ if(!tokenCodes.hasOwnProperty(arr[p1])) {
+ return false;
+ };
+ }
+ }
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-1.js new file mode 100644 index 000000000..88eb2869f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-1.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-1.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: null, true, false
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ null: 0,
+ true: 1,
+ false: 2
+ };
+ var arr = [
+ 'null',
+ 'true',
+ 'false'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-10.js new file mode 100644 index 000000000..a00ce7096 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-10.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-10.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: in, try, class
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ in: 0,
+ try: 1,
+ class: 2
+ };
+ var arr = [
+ 'in',
+ 'try',
+ 'class'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-11.js new file mode 100644 index 000000000..7a3a3af0c --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-11.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-11.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: enum, extends, super
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ enum: 0,
+ extends: 1,
+ super: 2
+ };
+ var arr = [
+ 'enum',
+ 'extends',
+ 'super'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-12.js new file mode 100644 index 000000000..b2b7645f5 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-12.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-12.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: const, export, import
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ const : 0,
+ export: 1,
+ import: 2
+ };
+ var arr = [
+ 'const',
+ 'export',
+ 'import'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-13.js new file mode 100644 index 000000000..a7b03b95c --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-13.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-13.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: implements, let, private
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ implements: 0,
+ let: 1,
+ private: 2
+ };
+ var arr = [
+ 'implements',
+ 'let',
+ 'private'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-14.js new file mode 100644 index 000000000..f24467c8f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-14.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-14.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: public, yield, interface
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ public: 0,
+ yield: 1,
+ interface: 2
+ };
+ var arr = [
+ 'public',
+ 'yield',
+ 'interface'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-15.js new file mode 100644 index 000000000..498e5e7d5 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-15.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-15.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: package, protected, static
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ package: 0,
+ protected: 1,
+ static: 2
+ };
+ var arr = [
+ 'package',
+ 'protected',
+ 'static'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-16.js new file mode 100644 index 000000000..8bf471549 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-16.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-16.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: undefined, NaN, Infinity
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ undefined: 0,
+ NaN: 1,
+ Infinity: 2
+ };
+ var arr = [
+ 'undefined',
+ 'NaN',
+ 'Infinity'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-2.js new file mode 100644 index 000000000..79ccb65b9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-2.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-2.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: break, case, do
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ break: 0,
+ case: 1,
+ do: 2
+ };
+ var arr = [
+ 'break',
+ 'case',
+ 'do'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-3.js new file mode 100644 index 000000000..643fce68f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-3.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-3.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: instanceof, typeof, else
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ instanceof: 0,
+ typeof: 1,
+ else: 2
+ };
+ var arr = [
+ 'instanceof',
+ 'typeof',
+ 'else'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-4.js new file mode 100644 index 000000000..8080248a2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-4.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-4.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: new, var, catch
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ new: 0,
+ var: 1,
+ catch: 2
+ };
+ var arr = [
+ 'new',
+ 'var',
+ 'catch'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-5.js new file mode 100644 index 000000000..bb3280732 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-5.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-5.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: finally, return, void
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ finally: 0,
+ return: 1,
+ void: 2
+ };
+ var arr = [
+ 'finally',
+ 'return',
+ 'void'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-6.js new file mode 100644 index 000000000..c9dc5a146 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-6.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-6.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: continue, for, switch
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ continue: 0,
+ for: 1,
+ switch: 2
+ };
+ var arr = [
+ 'continue',
+ 'for',
+ 'switch'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-7.js new file mode 100644 index 000000000..a0a5a977b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-7.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-7.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: while, debugger, function
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ while: 0,
+ debugger: 1,
+ function: 2
+ };
+ var arr = [
+ 'while' ,
+ 'debugger',
+ 'function'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-8.js new file mode 100644 index 000000000..d659f6acd --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-8.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-8.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: this, with, default
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ this: 0,
+ with: 1,
+ default: 2
+ };
+ var arr = [
+ 'this',
+ 'with',
+ 'default'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-9.js new file mode 100644 index 000000000..6e21dfd78 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-5-9.js @@ -0,0 +1,30 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-5-9.js
+ * @description Allow reserved words as property names at object initialization, accessed via indexing: if, throw, delete
+ */
+
+
+function testcase() {
+ var tokenCodes = {
+ if: 0,
+ throw: 1,
+ delete: 2
+ };
+ var arr = [
+ 'if',
+ 'throw',
+ 'delete'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-1.js new file mode 100644 index 000000000..b2c98910a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-1.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-1.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: null, true, false
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.null = 0;
+ tokenCodes.true = 1;
+ tokenCodes.false = 2;
+ var arr = [
+ 'null',
+ 'true',
+ 'false'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-10.js new file mode 100644 index 000000000..3099c4abc --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-10.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-10.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: in, try, class
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.in = 0;
+ tokenCodes.try = 1;
+ tokenCodes.class = 2;
+ var arr = [
+ 'in',
+ 'try',
+ 'class'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-11.js new file mode 100644 index 000000000..9fda29ca4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-11.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-11.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: enum, extends, super
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.enum = 0;
+ tokenCodes.extends = 1;
+ tokenCodes.super = 2;
+ var arr = [
+ 'enum',
+ 'extends',
+ 'super'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-12.js new file mode 100644 index 000000000..7cfb6643a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-12.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-12.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: const, export, import
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.const = 0;
+ tokenCodes.export = 1;
+ tokenCodes.import = 2;
+ var arr = [
+ 'const',
+ 'export',
+ 'import'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-13.js new file mode 100644 index 000000000..ff4bf38cf --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-13.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-13.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: implements, let, private
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.implements = 0;
+ tokenCodes.let = 1;
+ tokenCodes.private = 2;
+ var arr = [
+ 'implements',
+ 'let',
+ 'private'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-14.js new file mode 100644 index 000000000..4bea56fe5 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-14.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-14.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: public, yield, interface
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.public = 0;
+ tokenCodes.yield = 1;
+ tokenCodes.interface = 2;
+ var arr = [
+ 'public',
+ 'yield',
+ 'interface'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-15.js new file mode 100644 index 000000000..0021da41b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-15.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-15.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: package, protected, static
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.package = 0;
+ tokenCodes.protected = 1;
+ tokenCodes.static = 2;
+ var arr = [
+ 'package',
+ 'protected',
+ 'static'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-16.js new file mode 100644 index 000000000..bc98a8a5f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-16.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-16.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: undefined, NaN, Infinity
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.undefined = 0;
+ tokenCodes.NaN = 1;
+ tokenCodes.Infinity = 2;
+ var arr = [
+ 'undefined',
+ 'NaN',
+ 'Infinity'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-2.js new file mode 100644 index 000000000..65c06c957 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-2.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-2.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: break, case, do
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.break = 0;
+ tokenCodes.case = 1;
+ tokenCodes.do = 2;
+ var arr = [
+ 'break',
+ 'case',
+ 'do'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-3.js new file mode 100644 index 000000000..b403a3efe --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-3.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-3.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: instanceof, typeof, else
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.instanceof = 0;
+ tokenCodes.typeof = 1;
+ tokenCodes.else = 2;
+ var arr = [
+ 'instanceof',
+ 'typeof',
+ 'else'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-4.js new file mode 100644 index 000000000..cbe85b25e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-4.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-4.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: new, var, catch
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.new = 0;
+ tokenCodes.var = 1;
+ tokenCodes.catch = 2;
+ var arr = [
+ 'new',
+ 'var',
+ 'catch'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-5.js new file mode 100644 index 000000000..5d2e1b6f6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-5.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-5.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: finally, return, void
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.finally = 0;
+ tokenCodes.return = 1;
+ tokenCodes.void = 2;
+ var arr = [
+ 'finally',
+ 'return',
+ 'void'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-6.js new file mode 100644 index 000000000..df407917b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-6.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-6.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: continue, for, switch
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.continue = 0;
+ tokenCodes.for = 1;
+ tokenCodes.switch = 2;
+ var arr = [
+ 'continue',
+ 'for',
+ 'switch'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-7.js new file mode 100644 index 000000000..1c4ca549c --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-7.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-7.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: while, debugger, function
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.while = 0;
+ tokenCodes.debugger = 1;
+ tokenCodes.function = 2;
+ var arr = [
+ 'while' ,
+ 'debugger',
+ 'function'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-8.js new file mode 100644 index 000000000..945eecf73 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-8.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-8.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: this, with, default
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.this = 0;
+ tokenCodes.with = 1;
+ tokenCodes.default = 2;
+ var arr = [
+ 'this',
+ 'with',
+ 'default'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-9.js new file mode 100644 index 000000000..ae8bbbcd2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-6-9.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-6-9.js
+ * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: if, throw, delete
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes.if = 0;
+ tokenCodes.throw = 1;
+ tokenCodes.delete = 2;
+ var arr = [
+ 'if',
+ 'throw',
+ 'delete'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-1.js new file mode 100644 index 000000000..060d98cb9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-1.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-1.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: null, true, false
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['null'] = 0;
+ tokenCodes['true'] = 1;
+ tokenCodes['false'] = 2;
+ var arr = [
+ 'null',
+ 'true',
+ 'false'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-10.js new file mode 100644 index 000000000..22a2e32fb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-10.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-10.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: in, try, class
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['in'] = 0;
+ tokenCodes['try'] = 1;
+ tokenCodes['class'] = 2;
+ var arr = [
+ 'in',
+ 'try',
+ 'class'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-11.js new file mode 100644 index 000000000..0c0176399 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-11.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-11.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: enum, extends, super
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['enum'] = 0;
+ tokenCodes['extends'] = 1;
+ tokenCodes['super'] = 2;
+ var arr = [
+ 'enum',
+ 'extends',
+ 'super'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-12.js new file mode 100644 index 000000000..56eb9d318 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-12.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-12.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: const, export, import
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['const'] = 0;
+ tokenCodes['export'] = 1;
+ tokenCodes['import'] = 2;
+ var arr = [
+ 'const',
+ 'export',
+ 'import'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-13.js new file mode 100644 index 000000000..fd8beb9a2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-13.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-13.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: implements, let, private
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['implements'] = 0;
+ tokenCodes['let'] = 1;
+ tokenCodes['private'] = 2;
+ var arr = [
+ 'implements',
+ 'let',
+ 'private'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-14.js new file mode 100644 index 000000000..295abc5d1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-14.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-14.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: public, yield, interface
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['public'] = 0;
+ tokenCodes['yield'] = 1;
+ tokenCodes['interface'] = 2;
+ var arr = [
+ 'public',
+ 'yield',
+ 'interface'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-15.js new file mode 100644 index 000000000..5c95f6db6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-15.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-15.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: package, protected, static
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['package'] = 0;
+ tokenCodes['protected'] = 1;
+ tokenCodes['static'] = 2;
+ var arr = [
+ 'package',
+ 'protected',
+ 'static'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-16.js new file mode 100644 index 000000000..f8146c5ab --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-16.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-16.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: undefined, NaN, Infinity
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['undefined'] = 0;
+ tokenCodes['NaN'] = 1;
+ tokenCodes['Infinity'] = 2;
+ var arr = [
+ 'undefined',
+ 'NaN',
+ 'Infinity'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-2.js new file mode 100644 index 000000000..62df8ea1d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-2.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-2.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: break, case, do
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['break'] = 0;
+ tokenCodes['case'] = 1;
+ tokenCodes['do'] = 2;
+ var arr = [
+ 'break',
+ 'case',
+ 'do'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-3.js new file mode 100644 index 000000000..772c108b4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-3.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-3.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: instanceof, typeof, else
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['instanceof'] = 0;
+ tokenCodes['typeof'] = 1;
+ tokenCodes['else'] = 2;
+ var arr = [
+ 'instanceof',
+ 'typeof',
+ 'else'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-4.js new file mode 100644 index 000000000..99d7868b9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-4.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-4.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: new, var, catch
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['new'] = 0;
+ tokenCodes['var'] = 1;
+ tokenCodes['catch'] = 2;
+ var arr = [
+ 'new',
+ 'var',
+ 'catch'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-5.js new file mode 100644 index 000000000..3543e4f25 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-5.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-5.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: finally, return, void
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['finally'] = 0;
+ tokenCodes['return'] = 1;
+ tokenCodes['void'] = 2;
+ var arr = [
+ 'finally',
+ 'return',
+ 'void'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-6.js new file mode 100644 index 000000000..652fc97d7 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-6.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-6.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: continue, for, switch
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['continue'] = 0;
+ tokenCodes['for'] = 1;
+ tokenCodes['switch'] = 2;
+ var arr = [
+ 'continue',
+ 'for',
+ 'switch'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-7.js new file mode 100644 index 000000000..1605d5d0b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-7.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-7.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: while, debugger, function
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['while'] = 0;
+ tokenCodes['debugger'] = 1;
+ tokenCodes['function'] = 2;
+ var arr = [
+ 'while',
+ 'debugger',
+ 'function'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-8.js new file mode 100644 index 000000000..eab4c423a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-8.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-8.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: this, with, default
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['this'] = 0;
+ tokenCodes['with'] = 1;
+ tokenCodes['default'] = 2;
+ var arr = [
+ 'this',
+ 'with',
+ 'default'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-9.js new file mode 100644 index 000000000..9f018dfa6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-7-9.js @@ -0,0 +1,29 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-7-9.js
+ * @description Allow reserved words as property names by index assignment, accessed via indexing: if, throw, delete
+ */
+
+
+function testcase() {
+ var tokenCodes = {};
+ tokenCodes['if'] = 0;
+ tokenCodes['throw'] = 1;
+ tokenCodes['delete'] = 2;
+ var arr = [
+ 'if',
+ 'throw',
+ 'delete'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-1.js new file mode 100644 index 000000000..7d816111d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-1.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-1.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: null, true, false
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set null(value) {
+ test0 = value;
+ },
+ get null() {
+ return test0;
+ },
+ set true(value) {
+ test1 = value;
+ },
+ get true() {
+ return test1;
+ },
+ set false(value) {
+ test2 = value;
+ },
+ get false(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'null',
+ 'true',
+ 'false'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-10.js new file mode 100644 index 000000000..3b48de443 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-10.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-10.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: in, try, class
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set in(value){
+ test0 = value;
+ },
+ get in(){
+ return test0;
+ },
+ set try(value){
+ test1 = value;
+ },
+ get try(){
+ return test1
+ },
+ set class(value){
+ test2 = value;
+ },
+ get class(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'in',
+ 'try',
+ 'class'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-11.js new file mode 100644 index 000000000..ff92952e1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-11.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-11.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: enum, extends, super
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set enum(value){
+ test0 = value;
+ },
+ get enum(){
+ return test0;
+ },
+ set extends(value){
+ test1 = value;
+ },
+ get extends(){
+ return test1;
+ },
+ set super(value){
+ test2 = value;
+ },
+ get super(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'enum',
+ 'extends',
+ 'super'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-12.js new file mode 100644 index 000000000..2a4a1d170 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-12.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-12.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: const, export, import
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set const(value){
+ test0 = value;
+ },
+ get const(){
+ return test0;
+ },
+ set export(value){
+ test1 = value;
+ },
+ get export(){
+ return test1
+ },
+ set import(value){
+ test2 = value;
+ },
+ get import(){
+ return test2
+ }
+ };
+ var arr = [
+ 'const',
+ 'export',
+ 'import'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-13.js new file mode 100644 index 000000000..a2f46d570 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-13.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-13.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: implements, let, private
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set implements(value){
+ test0 = value;
+ },
+ get implements(){
+ return test0;
+ },
+ set let(value){
+ test1 = value;
+ },
+ get let(){
+ return test1
+ },
+ set private(value){
+ test2 = value;
+ },
+ get private(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'implements',
+ 'let',
+ 'private'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-14.js new file mode 100644 index 000000000..393ae46b0 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-14.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-14.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: public, yield, interface
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set public(value){
+ test0 = value;
+ },
+ get public(){
+ return test0;
+ },
+ set yield(value){
+ test1 = value;
+ },
+ get yield(){
+ return test1;
+ },
+ set interface(value){
+ test2 = value;
+ },
+ get interface(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'public',
+ 'yield',
+ 'interface'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-15.js new file mode 100644 index 000000000..81d5f4b7f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-15.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-15.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: package, protected, static
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set package(value){
+ test0 = value;
+ },
+ get package(){
+ return test0;
+ },
+ set protected(value){
+ test1 = value;
+ },
+ get protected(){
+ return test1
+ },
+ set static(value){
+ test2 = value;
+ },
+ get static(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'package',
+ 'protected',
+ 'static'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-16.js new file mode 100644 index 000000000..91ff6b9c8 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-16.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-16.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: undefined, NaN, Infinity
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set undefined(value){
+ test0 = value;
+ },
+ get undefined(){
+ return test0;
+ },
+ set NaN(value){
+ test1 = value;
+ },
+ get NaN(){
+ return test1;
+ },
+ set Infinity(value){
+ test2 = value;
+ },
+ get Infinity(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'undefined',
+ 'NaN',
+ 'Infinity'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-2.js new file mode 100644 index 000000000..9af600938 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-2.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-2.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: break, case, do
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set break(value){
+ test0 = value;
+ },
+ get break(){
+ return test0;
+ },
+ set case(value){
+ test1 = value;
+ },
+ get case(){
+ return test1;
+ },
+ set do(value){
+ test2 = value;
+ },
+ get do(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'break',
+ 'case',
+ 'do'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-3.js new file mode 100644 index 000000000..b26b4d020 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-3.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-3.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: instanceof, typeof, else
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set instanceof(value){
+ test0 = value;
+ },
+ get instanceof(){
+ return test0;
+ },
+ set typeof(value){
+ test1 = value;
+ },
+ get typeof(){
+ return test1;
+ },
+ set else(value){
+ test2 = value;
+ },
+ get else(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'instanceof',
+ 'typeof',
+ 'else'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-4.js new file mode 100644 index 000000000..b8de25452 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-4.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-4.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: new, var, catch
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set new(value){
+ test0 = value;
+ },
+ get new(){
+ return test0;
+ },
+ set var(value){
+ test1 = value;
+ },
+ get var(){
+ return test1;
+ },
+ set catch(value){
+ test2 = value;
+ },
+ get catch(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'new',
+ 'var',
+ 'catch'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-5.js new file mode 100644 index 000000000..26d5f3aac --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-5.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-5.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: finally, return, void
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set finally(value){
+ test0 = value;
+ },
+ get finally(){
+ return test0;
+ },
+ set return(value){
+ test1 = value;
+ },
+ get return(){
+ return test1;
+ },
+ set void(value){
+ test2 = value;
+ },
+ get void(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'finally',
+ 'return',
+ 'void'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-6.js new file mode 100644 index 000000000..4b5f217f4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-6.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-6.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: continue, for, switch
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set continue(value){
+ test0 = value;
+ },
+ get continue(){
+ return test0;
+ },
+ set for(value){
+ test1 = value;
+ },
+ get for(){
+ return test1;
+ },
+ set switch(value){
+ test2 = value;
+ },
+ get switch(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'continue',
+ 'for',
+ 'switch'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-7.js new file mode 100644 index 000000000..58555e62e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-7.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-7.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: while, debugger, function
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set while(value){
+ test0 = value;
+ },
+ get while(){
+ return test0
+ },
+ set debugger(value){
+ test1 = value;
+ },
+ get debugger(){
+ return test1;
+ },
+ set function(value){
+ test2 = value;
+ },
+ get function(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'while' ,
+ 'debugger',
+ 'function'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-8.js new file mode 100644 index 000000000..c6c39dd22 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-8.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-8.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: this, with, default
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set this(value){
+ test0 = value;
+ },
+ get this(){
+ return test0;
+ },
+ set with(value){
+ test1 = value;
+ },
+ get with(){
+ return test1;
+ },
+ set default(value){
+ test2 = value;
+ },
+ get default(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'this',
+ 'with',
+ 'default'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-9.js new file mode 100644 index 000000000..f61ec565b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1-8-9.js @@ -0,0 +1,46 @@ +/// 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 ch07/7.6/7.6.1/7.6.1-8-9.js
+ * @description Allow reserved words as property names by set function within an object, accessed via indexing: if, throw, delete
+ */
+
+
+function testcase() {
+ var test0 = 0, test1 = 1, test2 = 2;
+ var tokenCodes = {
+ set if(value){
+ test0 = value;
+ },
+ get if(){
+ return test0;
+ },
+ set throw(value){
+ test1 = value;
+ },
+ get throw(){
+ return test1
+ },
+ set delete(value){
+ test2 = value;
+ },
+ get delete(){
+ return test2;
+ }
+ };
+ var arr = [
+ 'if',
+ 'throw',
+ 'delete'
+ ];
+ for (var i = 0; i < arr.length; i++) {
+ if (tokenCodes[arr[i]] !== i) {
+ return false;
+ };
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js new file mode 100644 index 000000000..89653b5cd --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "break" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js + * @description Checking if execution of "break=1" fails + * @negative + */ + +break = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js new file mode 100644 index 000000000..0511807b6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "for" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js + * @description Checking if execution of "for=1" fails + * @negative + */ + +for = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js new file mode 100644 index 000000000..39d4b7efa --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "function" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js + * @description Checking if execution of "function=1" fails + * @negative + */ + +function = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js new file mode 100644 index 000000000..43433a6b5 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "if" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js + * @description Checking if execution of "if=1" fails + * @negative + */ + +if = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js new file mode 100644 index 000000000..2e52df961 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "in" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js + * @description Checking if execution of "in=1" fails + * @negative + */ + +in = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js new file mode 100644 index 000000000..5867436c7 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "instanceof" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js + * @description Checking if execution of "instanceof=1" fails + * @negative + */ + +instanceof = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js new file mode 100644 index 000000000..56ec3af72 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "new" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js + * @description Checking if execution of "new=1" fails + * @negative + */ + +new = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js new file mode 100644 index 000000000..7f6a21a7c --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "return" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js + * @description Checking if execution of "return=1" fails + * @negative + */ + +return = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js new file mode 100644 index 000000000..34024b4d4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "switch" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js + * @description Checking if execution of "switch=1" fails + * @negative + */ + +switch = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js new file mode 100644 index 000000000..6068789b6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "this" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js + * @description Checking if execution of "this=1" fails + * @negative + */ + +this = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js new file mode 100644 index 000000000..bb5ce8b7d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "throw" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js + * @description Checking if execution of "throw=1" fails + * @negative + */ + +throw = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js new file mode 100644 index 000000000..fa0b3a8fd --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "case" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js + * @description Checking if execution of "case=1" fails + * @negative + */ + +case = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js new file mode 100644 index 000000000..62ce326f6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "try" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js + * @description Checking if execution of "try=1" fails + * @negative + */ + +try = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js new file mode 100644 index 000000000..d2aeca3fc --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "typeof" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js + * @description Checking if execution of "typeof=1" fails + * @negative + */ + +typeof = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js new file mode 100644 index 000000000..2530ab8e7 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "var" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js + * @description Checking if execution of "var=1" fails + * @negative + */ + +var = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js new file mode 100644 index 000000000..61f99bce1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "void" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js + * @description Checking if execution of "void=1" fails + * @negative + */ + +void = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js new file mode 100644 index 000000000..8c6c2816d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "while" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js + * @description Checking if execution of "while=1" fails + * @negative + */ + +while = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js new file mode 100644 index 000000000..15a7745b1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "with" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js + * @description Checking if execution of "with=1" fails + * @negative + */ + +with = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js new file mode 100644 index 000000000..f69193845 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "catch" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js + * @description Checking if execution of "catch=1" fails + * @negative + */ + +catch = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js new file mode 100644 index 000000000..86c02078d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "continue" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js + * @description Checking if execution of "contunue=1" fails + * @negative + */ + +continue = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js new file mode 100644 index 000000000..52ad11b46 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "default" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js + * @description Checking if execution of "default=1" fails + * @negative + */ + +default = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js new file mode 100644 index 000000000..b6c24d8bf --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "delete" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js + * @description Checking if execution of "delete=1" fails + * @negative + */ + +delete = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js new file mode 100644 index 000000000..bce1d54ec --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "do" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js + * @description Checking if execution of "do=1" fails + * @negative + */ + +do = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js new file mode 100644 index 000000000..b51909070 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "else" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js + * @description Checking if execution of "else=1" fails + * @negative + */ + +else = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js new file mode 100644 index 000000000..cea582656 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "finally" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js + * @description Checking if execution of "finally=1" fails + * @negative + */ + +finally = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/browser.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/browser.js diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/shell.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.1/shell.js diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2-1gs.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2-1gs.js new file mode 100644 index 000000000..b76c692e7 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2-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 ch07/7.6/7.6.1/7.6.1.2-1gs.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'implements' occurs in strict mode code
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+
+"use strict";
+throw NotEarlyError;
+var implements = 1;
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js new file mode 100644 index 000000000..99014065a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: implements (implements)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var \u0069mplements = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-s.js new file mode 100644 index 000000000..3327995db --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: l\u0065t (let)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var l\u0065t = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-s.js new file mode 100644 index 000000000..14a5183d8 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: privat\u0065 (private)
+ * @onlyStrict
+ */
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var privat\u0065 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-s.js new file mode 100644 index 000000000..846805b69 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0070\u0075\u0062\u006c\u0069\u0063 (public)
+ * @onlyStrict
+ */
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var \u0070\u0075\u0062\u006c\u0069\u0063 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-s.js new file mode 100644 index 000000000..f0536eac3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0079ield (yield)
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var \u0079ield = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-s.js new file mode 100644 index 000000000..5eb6d1ec6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: inte\u0072face (interface)
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var inte\u0072face = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-s.js new file mode 100644 index 000000000..db11bad05 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: packag\u0065 (package)
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var packag\u0065 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-s.js new file mode 100644 index 000000000..f2c7e9f90 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 (protected)
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-s.js new file mode 100644 index 000000000..b6ca63f82 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-s.js
+ * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0073\u0074\u0061\u0074\u0069\u0063 (static)
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var \u0073\u0074\u0061\u0074\u0069\u0063 = 123;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js new file mode 100644 index 000000000..3c34bc7cb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'implements' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var implements = 1;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js new file mode 100644 index 000000000..8c5004d91 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js
+ * @description Strict Mode - SyntaxError isn't thrown when 'IMPLEMENTS' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var IMPLEMENTS = 1;
+ return IMPLEMENTS === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js new file mode 100644 index 000000000..34a017854 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js
+ * @description Strict Mode - SyntaxError isn't thrown when 'Implements' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var Implements = 1;
+ return Implements === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js new file mode 100644 index 000000000..14796c164 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js
+ * @description Strict Mode - SyntaxError isn't thrown when 'implement' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var implement = 1;
+ return implement === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js new file mode 100644 index 000000000..4513e1222 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js
+ * @description Strict Mode - SyntaxError isn't thrown when 'implementss' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var implementss = 1;
+ return implementss === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js new file mode 100644 index 000000000..4863705c0 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js
+ * @description Strict Mode - SyntaxError isn't thrown when 'implements0' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var implements0 = 1;
+ return implements0 === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js new file mode 100644 index 000000000..16f6bc191 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js
+ * @description Strict Mode - SyntaxError isn't thrown when '_implements' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _implements = 1;
+ return _implements === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-2-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-2-s.js new file mode 100644 index 000000000..9f922e41d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-2-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'let' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var let = 1;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-s.js new file mode 100644 index 000000000..77530dd7b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'private' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var private = 1;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-s.js new file mode 100644 index 000000000..6f021380b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'public' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var public = 1;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-5-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-5-s.js new file mode 100644 index 000000000..f6a798385 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-5-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'yield' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var yield = 1;")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-s.js new file mode 100644 index 000000000..3e1e35ccd --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'interface' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var interface = 1;")
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-7-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-7-s.js new file mode 100644 index 000000000..6d2487376 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-7-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'package' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var package = 1;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-s.js new file mode 100644 index 000000000..8e2f8e8fe --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'protected' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var protected = 1;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-s.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-s.js new file mode 100644 index 000000000..6e5ebfd21 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-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 ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-s.js
+ * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'static' occurs in strict mode code
+ * @onlyStrict
+ */
+
+
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var static = 1;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js new file mode 100644 index 000000000..4b7573d26 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "abstract" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js + * @description Checking if execution of "abstract=1" succeeds + */ + +var abstract = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js new file mode 100644 index 000000000..d255891bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "export" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js + * @description Checking if execution of "export=1" fails + * @negative + */ + +var export = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js new file mode 100644 index 000000000..f95dbf77e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "extends" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js + * @description Checking if execution of "extends=1" fails + * @negative + */ + +var extends = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js new file mode 100644 index 000000000..41d1a2aa3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "final" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js + * @description Checking if execution of "final=1" succeeds + */ + +var final = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js new file mode 100644 index 000000000..fcea14220 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "float" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js + * @description Checking if execution of "float=1" succeeds + */ + +var float = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js new file mode 100644 index 000000000..a8c81aef6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "goto" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js + * @description Checking if execution of "goto=1" succeeds + */ + +var goto = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js new file mode 100644 index 000000000..b1d3adb8a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "implements" token can not be used as identifier in strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js + * @description Checking if execution of "implements=1" fails in strict code + * @onlyStrict + * @negative + */ + +"use strict"; + +var implements = 1; diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js new file mode 100644 index 000000000..845f7914a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "implements" token can be used as identifier in non-strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js + * @description Checking if execution of "implements=1" succeeds in non-strict code + * @noStrict + */ + +var implements = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js new file mode 100644 index 000000000..0e28098f0 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "import" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js + * @description Checking if execution of "import=1" fails + * @negative + */ + +var import = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js new file mode 100644 index 000000000..97bd27342 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "int" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js + * @description Checking if execution of "int=1" succeeds + */ + +var int = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js new file mode 100644 index 000000000..e8dd1ff42 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "interface" token can not be used as identifier in strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js + * @description Checking if execution of "interface = 1" fails in + * strict code + * @onlyStrict + * @negative + */ + +"use strict"; +var interface = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js new file mode 100644 index 000000000..878a7cd42 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js @@ -0,0 +1,15 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "interface" token can be used as identifier in + * non-strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js + * @description Checking if execution of "interface = 1" succeeds in + * non-strict code + * @noStrict + */ + +var interface = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js new file mode 100644 index 000000000..d4905b5aa --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "long" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js + * @description Checking if execution of "long=1" succeeds + */ + +var long = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js new file mode 100644 index 000000000..16f86cd48 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "boolean" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js + * @description Checking if execution of "boolean=1" succeeds + */ + +var boolean = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js new file mode 100644 index 000000000..1646a5a8f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "native" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js + * @description Checking if execution of "native=1" succeeds + */ + +var native = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js new file mode 100644 index 000000000..ef2d1dacc --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "package" token can not be used as identifier in strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js + * @description Checking if execution of "package=1" fails in strict code + * @onlyStrict + * @negative + */ + +"use strict"; +var package = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js new file mode 100644 index 000000000..3a33532fe --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "package" token can be used as identifier in non-strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js + * @description Checking if execution of "package=1" succeeds in non-strict code + * @noStrict + */ + +var package = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js new file mode 100644 index 000000000..45fc83f29 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "private" token can not be used as identifier in strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js + * @description Checking if execution of "private=1" fails in strict code + * @onlyStrict + * @negative + */ + +"use strict"; +var private = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js new file mode 100644 index 000000000..0562ca843 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "private" token can be used as identifier in non-strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js + * @description Checking if execution of "private=1" succeeds in non-strict code + * @noStrict + */ + +var private = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js new file mode 100644 index 000000000..c04b13172 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "protected" token can not be used as identifier in strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js + * @description Checking if execution of "protected=1" fails in + * strict code + * @onlyStrict + * @negative + */ + +"use strict"; +var protected = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js new file mode 100644 index 000000000..499512d5b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "protected" token can be used as identifier in non-strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js + * @description Checking if execution of "protected=1" succeeds in non-strict code + * @noStrict + */ + +var protected = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js new file mode 100644 index 000000000..55f99e8fd --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "public" token can not be used as identifier in strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js + * @description Checking if execution of "public=1" fails in strict code + * @onlyStrict + * @negative + */ + +"use strict"; +var public = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js new file mode 100644 index 000000000..7090147cd --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "public" token can be used as identifier in non-strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js + * @description Checking if execution of "public=1" succeeds in non-strict code + * @noStrict + */ + +var public = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js new file mode 100644 index 000000000..0c11e3cf3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "short" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js + * @description Checking if execution of "short=1" succeeds + */ + +var short = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js new file mode 100644 index 000000000..a1f336935 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "static" token can not be used as identifier in strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js + * @description Checking if execution of "static=1" fails in strict code + * @onlyStrict + * @negative + */ + +"use strict"; +var static = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js new file mode 100644 index 000000000..2e7e1f7b7 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js @@ -0,0 +1,13 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "static" token can be used as identifier in non-strict code + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js + * @description Checking if execution of "static=1" succeeds in non-strict code + * @noStrict + */ + +var static = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js new file mode 100644 index 000000000..c78862fb9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "super" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js + * @description Checking if execution of "super=1" fails + * @negative + */ + +var super = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js new file mode 100644 index 000000000..515372a7a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "synchronized" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js + * @description Checking if execution of "synchronized=1" succeeds + */ + +var synchronized = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js new file mode 100644 index 000000000..54dec6155 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "throws" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js + * @description Checking if execution of "throws=1" succeeds + */ + +var throws = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js new file mode 100644 index 000000000..50c5d7885 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "byte" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js + * @description Checking if execution of "byte=1" succeeds + */ + +var byte = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js new file mode 100644 index 000000000..37128f047 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "transient" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js + * @description Checking if execution of "transient=1" succeeds + */ + +var transient = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js new file mode 100644 index 000000000..57fb357d8 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "volatile" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js + * @description Checking if execution of "volatile=1" succeeds + */ + +var volatile = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js new file mode 100644 index 000000000..1af1677e4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "char" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js + * @description Checking if execution of "char=1" succeeds + */ + +var char = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js new file mode 100644 index 000000000..b84b44248 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "class" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js + * @description Checking if execution of "class=1" fails + * @negative + */ + +var class = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js new file mode 100644 index 000000000..da95d7ebf --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "const" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js + * @description Checking if execution of "const=1" fails + * @negative + */ + +var const = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js new file mode 100644 index 000000000..ed4c3f0fc --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "debugger" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js + * @description Checking if execution of "debugger=1" fails + * @negative + */ + +var debugger = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js new file mode 100644 index 000000000..70a0a0a49 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js @@ -0,0 +1,12 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "double" token can be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js + * @description Checking if execution of "double=1" succeeds + */ + +var double = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js new file mode 100644 index 000000000..5294cb0d0 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "enum" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js + * @description Checking if execution of "enum=1" fails + * @negative + */ + +var enum = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/browser.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/browser.js diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/shell.js b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/7.6.1.2/shell.js diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.1.js b/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.1.js new file mode 100644 index 000000000..d97c7843a --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.1.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "null" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/S7.6.1_A1.1.js + * @description Checking if execution of "null = 1" fails + * @negative + */ + +null = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.2.js b/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.2.js new file mode 100644 index 000000000..2c49731cb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.2.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "true" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/S7.6.1_A1.2.js + * @description Checking if execution of "true=1" fails + * @negative + */ + +true = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.3.js b/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.3.js new file mode 100644 index 000000000..01cf52f75 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A1.3.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The "false" token can not be used as identifier + * + * @path ch07/7.6/7.6.1/S7.6.1_A1.3.js + * @description Checking if execution of "false=1" fails + * @negative + */ + +false = 1; + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A2.js b/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A2.js new file mode 100644 index 000000000..e123f067f --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/S7.6.1_A2.js @@ -0,0 +1,121 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * List of words that are not reserved + * + * @path ch07/7.6/7.6.1/S7.6.1_A2.js + * @description Try assign 1 for not reserved words + */ + +// a +var and = 1; +var and_eq = 1; +var as = 1; +var asm = 1; +var assert = 1; +var auto = 1; +// b +var base = 1; +var bitand = 1; +var bitor = 1; +var bool = 1; +var byvalue = 1; +// c +var checked = 1; +var clone = 1; +var comment = 1; +var compl = 1; +var const_cast = 1; +// d +var decimal = 1; +var delegate = 1; +var dynamic_cast = 1; +// e +var explicit = 1; +var extern = 1; +var equals = 1; +var event = 1; +// f +var finalize = 1; +var fixed = 1; +var friend = 1; +var foreach = 1; +var future = 1; +// g +var getClass = 1; +var generic = 1; +// h +var hashCode = 1; +// i +var implicit = 1; +var infinity = 1; +var inline = 1; +var inner = 1; +var internal = 1; +var is = 1; +// j +// k +// l +var lock = 1; +// m +var mutable = 1; +// n +var namespace = 1; +var not = 1; +var notify = 1; +var notifyAll = 1; +var not_eq = 1; +// o +var object = 1; +var operator = 1; +var or = 1; +var or_eq = 1; +var out = 1; +var outer = 1; +var override = 1; +// p +var params = 1; +// q +// r +var readonly = 1; +var reinterpret_cast = 1; +var ref = 1; +var register = 1; + +// s +var sbyte = 1; +var signed = 1; +var sizeof = 1; +var stackalloc = 1; +var static_cast = 1; +var string = 1; +var strictfp = 1; +var struct = 1; +// t +var template = 1; +var toString = 1; +var typedef = 1; +var typeid = 1; +// u +var uint = 1; +var unchecked = 1; +var undefiend = 1; +var union = 1; +var unsafe = 1; +var unsigned = 1; +var use = 1; +var using = 1; +var ushort = 1; +// v +var valueOf = 1; +var virtual = 1; +// w +var wait = 1; +var wchar_t = 1; +// x +var xor = 1; +var xor_eq = 1; +// y +// z + diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/browser.js b/js/src/tests/test262/ch07/7.6/7.6.1/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/browser.js diff --git a/js/src/tests/test262/ch07/7.6/7.6.1/shell.js b/js/src/tests/test262/ch07/7.6/7.6.1/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/7.6.1/shell.js diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T1.js b/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T1.js new file mode 100644 index 000000000..54aee1064 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T1.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierStart :: $ + * + * @path ch07/7.6/S7.6_A1.2_T1.js + * @description Create variable $ + */ + +//CHECK#1 +var $ = 1; +if ($ !== 1) { + $ERROR('#1: var $ = 1; $ === 1. Actual: ' + ($)); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T2.js b/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T2.js new file mode 100644 index 000000000..d6474ac41 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T2.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierStart :: $ + * + * @path ch07/7.6/S7.6_A1.2_T2.js + * @description The $ as unicode character \u0024 + */ + +//CHECK#1 +var \u0024 = 1; +if ($ !== 1) { + $ERROR('#1: var \\u0024 = 1; $ === 1. Actual: ' + ($)); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T3.js b/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T3.js new file mode 100644 index 000000000..571075a76 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A1.2_T3.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierStart :: $ + * + * @path ch07/7.6/S7.6_A1.2_T3.js + * @description The $ as unicode character \u0024 + */ + +//CHECK#1 +var identifier = String.fromCharCode(0x0024); +eval("var " + identifier + "=1"); +if (eval(identifier + "===1") !== true) { + $ERROR('#1: var identifier = String.fromCharCode(0x0024); eval("var " + identifier + "=1"); eval(identifier + "===1") === true'); +} + +//CHECK#2 +if ("$" !== String.fromCharCode(0x0024)) { + $ERROR('#2: "$" === String.fromCharCode(0x0024)'); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T1.js b/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T1.js new file mode 100644 index 000000000..8d1164d2b --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T1.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierStart :: _ + * + * @path ch07/7.6/S7.6_A1.3_T1.js + * @description Create variable _ + */ + +//CHECK#1 +var _ = 1; +if (_ !== 1) { + $ERROR('#1: var _ = 1; _ === 1. Actual: ' + (_)); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T2.js b/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T2.js new file mode 100644 index 000000000..ba300f76d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T2.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierStart :: _ + * + * @path ch07/7.6/S7.6_A1.3_T2.js + * @description The _ as unicode character \u005F + */ + +//CHECK#1 +var \u005F = 1; +if (_ !== 1) { + $ERROR('#1: var \\u005F = 1; _ === 1. Actual: ' + (_)); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T3.js b/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T3.js new file mode 100644 index 000000000..e3a8361c2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A1.3_T3.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierStart :: _ + * + * @path ch07/7.6/S7.6_A1.3_T3.js + * @description The _ as unicode character \u005F + */ + +//CHECK#1 +var identifier = String.fromCharCode(0x005F); +eval("var " + identifier + "=1"); +if (eval(identifier + "===1") !== true) { + $ERROR('#1: var identifier = String.fromCharCode(0x005F); eval("var " + identifier + "=1"); eval(identifier + "===1") === true'); +} + +//CHECK#2 +if ("_" !== String.fromCharCode(0x005F)) { + $ERROR('#2: "_" === String.fromCharCode(0x005F)'); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T1.js b/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T1.js new file mode 100644 index 000000000..5ef24abef --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T1.js @@ -0,0 +1,75 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierPart :: IdentifierStart + * + * @path ch07/7.6/S7.6_A2.1_T1.js + * @description IdentifierStart :: UnicodeLetter + */ + +//CHECK#1 +try { + var identifier = "x" + "x"; + eval("var " + identifier + "=1"); + if (xx !== 1) { + $ERROR('#1.1: var identifier = "x" + "x"; eval("var " + identifier + "=1"); xx === 1. Actual: ' + (xx)); + } +} catch (e) { + $ERROR('#1.2: var identifier = "x" + "x"; eval("var " + identifier + "=1"); xx === 1. Actual: ' + (xx)); +} + +//CHECK#2 +try { + var identifier = "x" + String.fromCharCode(0x0078); + eval("var " + identifier + "=2"); + if (xx !== 2) { + $ERROR('#2.1: var identifier = "x" + String.fromCharCode(0x0078); eval("var " + identifier + "=2"); xx === 2. Actual: ' + (xx)); + } +} catch (e) { + $ERROR('#2.2: var identifier = "x" + String.fromCharCode(0x0078); eval("var " + identifier + "=2"); xx === 2. Actual: ' + (xx)); +} + +//CHECK#3 +try { + var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); + eval("var " + identifier + "=3"); + if (xx !== 3) { + $ERROR('#3.1: var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); eval("var " + identifier + "=3"); xx === 3. Actual: ' + (xx)); + } +} catch (e) { + $ERROR('#3.2: var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); eval("var " + identifier + "=3"); xx === 3. Actual: ' + (xx)); +} + +//CHECK#4 +try { + var identifier = "$" + String.fromCharCode(0x0078); + eval("var " + identifier + "=4"); + if ($x !== 4) { + $ERROR('#4.1: var identifier = "$" + String.fromCharCode(0x0078); eval("var " + identifier + "=4"); $x === 4. Actual: ' + ($x)); + } +} catch (e) { + $ERROR('#4.2: var identifier = "$" + String.fromCharCode(0x0078); eval("var " + identifier + "=4"); $x === 4. Actual: ' + ($x)); +} + +//CHECK#5 +try { + var identifier = "_" + String.fromCharCode(0x0078); + eval("var " + identifier + "=5"); + if (_x !== 5) { + $ERROR('#5.1: var identifier = "_" + String.fromCharCode(0x0078); eval("var " + identifier + "=5"); _x === 5. Actual: ' + (_x)); + } +} catch (e) { + $ERROR('#5.2: var identifier = "_" + String.fromCharCode(0x0078); eval("var " + identifier + "=5"); _x === 5. Actual: ' + (_x)); +} + +//CHECK#6 +try { + var \u0078x = 6; + if (xx !== 6) { + $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); + } +} catch (e) { + $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T2.js b/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T2.js new file mode 100644 index 000000000..3d595b566 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T2.js @@ -0,0 +1,75 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierPart :: IdentifierStart + * + * @path ch07/7.6/S7.6_A2.1_T2.js + * @description IdentifierStart :: $ + */ + +//CHECK#1 +try { + var identifier = "x" + "$"; + eval("var " + identifier + "=1"); + if (x$ !== 1) { + $ERROR('#1.1: var identifier = "x" + "$"; eval("var " + identifier + "=1"); x$ === 1. Actual: ' + (x$)); + } +} catch (e) { + $ERROR('#1.2: var identifier = "x" + "$"; eval("var " + identifier + "=1"); x$ === 1. Actual: ' + (x$)); +} + +//CHECK#2 +try { + var identifier = String.fromCharCode(0x0078) + "$"; + eval("var " + identifier + "=2"); + if (x$ !== 2) { + $ERROR('#2.1: var identifier = String.fromCharCode(0x0078) + "$"; eval("var " + identifier + "=2"); x$ === 2. Actual: ' + (x$)); + } +} catch (e) { + $ERROR('#2.2: var identifier = String.fromCharCode(0x0078) + "$"; eval("var " + identifier + "=2"); x$ === 2. Actual: ' + (x$)); +} + +//CHECK#3 +try { + var identifier = "$" + "$"; + eval("var " + identifier + "=3"); + if ($$ !== 3) { + $ERROR('#3.1: var identifier = "$" + "$"; eval("var " + identifier + "=3"); $$ === 3. Actual: ' + ($$)); + } +} catch (e) { + $ERROR('#3.2: var identifier = "$" + "$"; eval("var " + identifier + "=3"); $$ === 3. Actual: ' + ($$)); +} + +//CHECK#4 +try { + var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); + eval("var " + identifier + "=4"); + if ($$ !== 4) { + $ERROR('#4.1: var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); eval("var " + identifier + "=4"); $$ === 4. Actual: ' + ($$)); + } +} catch (e) { + $ERROR('#4.2: var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); eval("var " + identifier + "=4"); $$ === 4. Actual: ' + ($$)); +} + +//CHECK#5 +try { + var identifier = "_" + "$"; + eval("var " + identifier + "=5"); + if (_$ !== 5) { + $ERROR('#5.1: var identifier = "_" + "$"; eval("var " + identifier + "=5"); _$ === 5. Actual: ' + (_$)); + } +} catch (e) { + $ERROR('#5.2: var identifier = "_" + "$"; eval("var " + identifier + "=5"); _$ === 5. Actual: ' + (_$)); +} + +//CHECK#6 +try { + var \u0078$ = 6; + if (x$ !== 6) { + $ERROR('#6.1: var \\u0078$ = 1; x$ === 6. Actual: ' + (x$)); + } +} catch (e) { + $ERROR('#6.2: var \\u0078$ = 1; x$ === 6. Actual: ' + (x$)); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T3.js b/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T3.js new file mode 100644 index 000000000..9c1032169 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T3.js @@ -0,0 +1,75 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierPart :: IdentifierStart + * + * @path ch07/7.6/S7.6_A2.1_T3.js + * @description IdentifierStart :: _ + */ + +//CHECK#1 +try { + var identifier = "x" + "_"; + eval("var " + identifier + "=1"); + if (x_ !== 1) { + $ERROR('#1.1: var identifier = "x" + "_"; eval("var " + identifier + "=1"); x_ === 1. Actual: ' + (x_)); + } +} catch (e) { + $ERROR('#1.2: var identifier = "x" + "_"; eval("var " + identifier + "=1"); x_ === 1. Actual: ' + (x_)); +} + +//CHECK#2 +try { + var identifier = String.fromCharCode(0x0078) + "_"; + eval("var " + identifier + "=2"); + if (x_ !== 2) { + $ERROR('#2.1: var identifier = String.fromCharCode(0x0078) + "_"; eval("var " + identifier + "=2"); x_ === 2. Actual: ' + (x_)); + } +} catch (e) { + $ERROR('#2.2: var identifier = String.fromCharCode(0x0078) + "_"; eval("var " + identifier + "=2"); x_ === 2. Actual: ' + (x_)); +} + +//CHECK#3 +try { + var identifier = "_" + "_"; + eval("var " + identifier + "=3"); + if (__ !== 3) { + $ERROR('#3.1: var identifier = "_" + "_"; eval("var " + identifier + "=3"); __ === 3. Actual: ' + (__)); + } +} catch (e) { + $ERROR('#3.2: var identifier = "_" + "_"; eval("var " + identifier + "=3"); __ === 3. Actual: ' + (__)); +} + +//CHECK#4 +try { + var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); + eval("var " + identifier + "=4"); + if (__ !== 4) { + $ERROR('#4.1: var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); eval("var " + identifier + "=4"); __ === 4. Actual: ' + (__)); + } +} catch (e) { + $ERROR('#4.2: var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); eval("var " + identifier + "=4"); __ === 4. Actual: ' + (__)); +} + +//CHECK#5 +try { + var identifier = "_" + "_"; + eval("var " + identifier + "=5"); + if (__ !== 5) { + $ERROR('#5.1: var identifier = "_" + "_"; eval("var " + identifier + "=5"); __ === 5. Actual: ' + (__)); + } +} catch (e) { + $ERROR('#5.2: var identifier = "_" + "_"; eval("var " + identifier + "=5"); __ === 5. Actual: ' + (__)); +} + +//CHECK#6 +try { + var \u0078_ = 6; + if (x_ !== 6) { + $ERROR('#6.1: var \\u0078_ = 1; x_ === 6. Actual: ' + (x_)); + } +} catch (e) { + $ERROR('#6.2: var \\u0078_ = 1; x_ === 6. Actual: ' + (x_)); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T4.js b/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T4.js new file mode 100644 index 000000000..a03182254 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A2.1_T4.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * IdentifierPart :: IdentifierStart + * + * @path ch07/7.6/S7.6_A2.1_T4.js + * @description IdentifierStart :: \UnicodeEscapeSequence + */ + +//CHECK#1 +try { + var x\u0078 = 1; + if (xx !== 1) { + $ERROR('#1.1: var x\\u0078 = 1; xx === 1. Actual: ' + (xx)); + } +} catch (e) { + $ERROR('#1.2: var x\\u0078 = 1; xx === 1. Actual: ' + (xx)); +} + +//CHECK#2 +try { + var \u0078\u0078 = 2; + if (xx !== 2) { + $ERROR('#2.1: var \\u0078\\u0078 = 1; xx === 2. Actual: ' + (xx)); + } +} catch (e) { + $ERROR('#2.2: var \\u0078\\u0078 = 1; xx === 2. Actual: ' + (xx)); +} + +//CHECK#3 +try { + var \u0024\u0024 = 3; + if ($$ !== 3) { + $ERROR('#3.1: var \\u0024\\u0024 = 1; $$ === 3. Actual: ' + ($$)); + } +} catch (e) { + $ERROR('#3.2: var \\u0024\\u0024 = 1; $$ === 3. Actual: ' + ($$)); +} + +//CHECK#4 +try { + var \u005F\u005F = 4; + if (__ !== 4) { + $ERROR('#4.1: var \\u005F\\u005F = 1; __ === 4. Actual: ' + (__)); + } +} catch (e) { + $ERROR('#4.2: var \\u005F\\u005F = 1; __ === 4. Actual: ' + (__)); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A4.1_T1.js b/js/src/tests/test262/ch07/7.6/S7.6_A4.1_T1.js new file mode 100644 index 000000000..1e18ed18d --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A4.1_T1.js @@ -0,0 +1,116 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Correct interpretation of ENGLISH ALPHABET + * + * @path ch07/7.6/S7.6_A4.1_T1.js + * @description Check ENGLISH CAPITAL ALPHABET + */ + +//CHECK#A-Z +var \u0041 = 1; +if (A !== 1) { + $ERROR('#A'); +} +var \u0042 = 1; +if (B !== 1) { + $ERROR('#B'); +} +var \u0043 = 1; +if (C !== 1) { + $ERROR('#C'); +} +var \u0044 = 1; +if (D !== 1) { + $ERROR('#D'); +} +var \u0045 = 1; +if (E !== 1) { + $ERROR('#E'); +} +var \u0046 = 1; +if (F !== 1) { + $ERROR('#F'); +} +var \u0047 = 1; +if (G !== 1) { + $ERROR('#G'); +} +var \u0048 = 1; +if (H !== 1) { + $ERROR('#H'); +} +var \u0049 = 1; +if (I !== 1) { + $ERROR('#I'); +} +var \u004A = 1; +if (J !== 1) { + $ERROR('#J'); +} +var \u004B = 1; +if (K !== 1) { + $ERROR('#K'); +} +var \u004C = 1; +if (L !== 1) { + $ERROR('#L'); +} +var \u004D = 1; +if (M !== 1) { + $ERROR('#M'); +} +var \u004E = 1; +if (N !== 1) { + $ERROR('#N'); +} +var \u004F = 1; +if (O !== 1) { + $ERROR('#O'); +} +var \u0050 = 1; +if (P !== 1) { + $ERROR('#P'); +} +var \u0051 = 1; +if (Q !== 1) { + $ERROR('#Q'); +} +var \u0052 = 1; +if (R !== 1) { + $ERROR('#R'); +} +var \u0053 = 1; +if (S !== 1) { + $ERROR('#S'); +} +var \u0054 = 1; +if (T !== 1) { + $ERROR('#T'); +} +var \u0055 = 1; +if (U !== 1) { + $ERROR('#U'); +} +var \u0056 = 1; +if (V !== 1) { + $ERROR('#V'); +} +var \u0057 = 1; +if (W !== 1) { + $ERROR('#W'); +} +var \u0058 = 1; +if (X !== 1) { + $ERROR('#X'); +} +var \u0059 = 1; +if (Y !== 1) { + $ERROR('#Y'); +} +var \u005A = 1; +if (Z !== 1) { + $ERROR('#Z'); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A4.1_T2.js b/js/src/tests/test262/ch07/7.6/S7.6_A4.1_T2.js new file mode 100644 index 000000000..20003197e --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A4.1_T2.js @@ -0,0 +1,117 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Correct interpretation of ENGLISH ALPHABET + * + * @path ch07/7.6/S7.6_A4.1_T2.js + * @description Check ENGLISH SMALL ALPHABET + */ + +//CHECK#a-z +var \u0061 = 1; +if (a !== 1) { + $ERROR('#a'); +} +var \u0062 = 1; +if (b !== 1) { + $ERROR('#b'); +} +var \u0063 = 1; +if (c !== 1) { + $ERROR('#c'); +} +var \u0064 = 1; +if (d !== 1) { + $ERROR('#d'); +} +var \u0065 = 1; +if (e !== 1) { + $ERROR('#e'); +} +var \u0066 = 1; +if (f !== 1) { + $ERROR('#f'); +} +var \u0067 = 1; +if (g !== 1) { + $ERROR('#g'); +} +var \u0068 = 1; +if (h !== 1) { + $ERROR('#h'); +} +var \u0069 = 1; +if (i !== 1) { + $ERROR('#i'); +} +var \u006A = 1; +if (j !== 1) { + $ERROR('#j'); +} +var \u006B = 1; +if (k !== 1) { + $ERROR('#k'); +} +var \u006C = 1; +if (l !== 1) { + $ERROR('#l'); +} +var \u006D = 1; +if (m !== 1) { + $ERROR('#m'); +} +var \u006E = 1; +if (n !== 1) { + $ERROR('#n'); +} +var \u006F = 1; +if (o !== 1) { + $ERROR('#o'); +} +var \u0070 = 1; +if (p !== 1) { + $ERROR('#p'); +} +var \u0071 = 1; +if (q !== 1) { + $ERROR('#q'); +} +var \u0072 = 1; +if (r !== 1) { + $ERROR('#r'); +} +var \u0073 = 1; +if (s !== 1) { + $ERROR('#s'); +} +var \u0074 = 1; +if (t !== 1) { + $ERROR('#t'); +} +var \u0075 = 1; +if (u !== 1) { + $ERROR('#u'); +} +var \u0076 = 1; +if (v !== 1) { + $ERROR('#v'); +} +var \u0077 = 1; +if (w !== 1) { + $ERROR('#w'); +} +var \u0078 = 1; +if (x !== 1) { + $ERROR('#x'); +} +var \u0079 = 1; +if (y !== 1) { + $ERROR('#y'); +} +var \u007A = 1; +if (z !== 1) { + $ERROR('#z'); +} + + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A4.2_T1.js b/js/src/tests/test262/ch07/7.6/S7.6_A4.2_T1.js new file mode 100644 index 000000000..e588b8c15 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A4.2_T1.js @@ -0,0 +1,144 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Correct interpretation of RUSSIAN ALPHABET + * + * @path ch07/7.6/S7.6_A4.2_T1.js + * @description Check RUSSIAN CAPITAL ALPHABET + */ + +//CHECK#А-Я +var \u0410 = 1; +if (А !== 1) { + $ERROR('#А'); +} +var \u0411 = 1; +if (Б !== 1) { + $ERROR('#Б'); +} +var \u0412 = 1; +if (В !== 1) { + $ERROR('#В'); +} +var \u0413 = 1; +if (Г !== 1) { + $ERROR('#Г'); +} +var \u0414 = 1; +if (Д !== 1) { + $ERROR('#Д'); +} +var \u0415 = 1; +if (Е !== 1) { + $ERROR('#Е'); +} +var \u0416 = 1; +if (Ж !== 1) { + $ERROR('#Ж'); +} +var \u0417 = 1; +if (З !== 1) { + $ERROR('#З'); +} +var \u0418 = 1; +if (И !== 1) { + $ERROR('#И'); +} +var \u0419 = 1; +if (Й !== 1) { + $ERROR('#Й'); +} +var \u041A = 1; +if (К !== 1) { + $ERROR('#К'); +} +var \u041B = 1; +if (Л !== 1) { + $ERROR('#Л'); +} +var \u041C = 1; +if (М !== 1) { + $ERROR('#М'); +} +var \u041D = 1; +if (Н !== 1) { + $ERROR('#Н'); +} +var \u041E = 1; +if (О !== 1) { + $ERROR('#О'); +} +var \u041F = 1; +if (П !== 1) { + $ERROR('#П'); +} +var \u0420 = 1; +if (Р !== 1) { + $ERROR('#Р'); +} +var \u0421 = 1; +if (С !== 1) { + $ERROR('#С'); +} +var \u0422 = 1; +if (Т !== 1) { + $ERROR('#Т'); +} +var \u0423 = 1; +if (У !== 1) { + $ERROR('#У'); +} +var \u0424 = 1; +if (Ф !== 1) { + $ERROR('#Ф'); +} +var \u0425 = 1; +if (Х !== 1) { + $ERROR('#Х'); +} +var \u0426 = 1; +if (Ц !== 1) { + $ERROR('#Ц'); +} +var \u0427 = 1; +if (Ч !== 1) { + $ERROR('#Ч'); +} +var \u0428 = 1; +if (Ш !== 1) { + $ERROR('#Ш'); +} +var \u0429 = 1; +if (Щ !== 1) { + $ERROR('#Щ'); +} +var \u042A = 1; +if (Ъ !== 1) { + $ERROR('#Ъ'); +} +var \u042B = 1; +if (Ы !== 1) { + $ERROR('#Ы'); +} +var \u042C = 1; +if (Ь !== 1) { + $ERROR('#Ь'); +} +var \u042D = 1; +if (Э !== 1) { + $ERROR('#Э'); +} +var \u042E = 1; +if (Ю !== 1) { + $ERROR('#Ю'); +} +var \u042F = 1; +if (Я !== 1) { + $ERROR('#Я'); +} +var \u0401 = 1; +if (Ё !== 1) { + $ERROR('#Ё'); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A4.2_T2.js b/js/src/tests/test262/ch07/7.6/S7.6_A4.2_T2.js new file mode 100644 index 000000000..119b94918 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A4.2_T2.js @@ -0,0 +1,144 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Correct interpretation of RUSSIAN ALPHABET + * + * @path ch07/7.6/S7.6_A4.2_T2.js + * @description Check RUSSIAN SMALL ALPHABET + */ + +//CHECK#а-я +var \u0430 = 1; +if (а !== 1) { + $ERROR('#а'); +} +var \u0431 = 1; +if (б !== 1) { + $ERROR('#б'); +} +var \u0432 = 1; +if (в !== 1) { + $ERROR('#в'); +} +var \u0433 = 1; +if (г !== 1) { + $ERROR('#г'); +} +var \u0434 = 1; +if (д !== 1) { + $ERROR('#д'); +} +var \u0435 = 1; +if (е !== 1) { + $ERROR('#е'); +} +var \u0436 = 1; +if (ж !== 1) { + $ERROR('#ж'); +} +var \u0437 = 1; +if (з !== 1) { + $ERROR('#з'); +} +var \u0438 = 1; +if (и !== 1) { + $ERROR('#и'); +} +var \u0439 = 1; +if (й !== 1) { + $ERROR('#й'); +} +var \u043A = 1; +if (к !== 1) { + $ERROR('#к'); +} +var \u043B = 1; +if (л !== 1) { + $ERROR('#л'); +} +var \u043C = 1; +if (м !== 1) { + $ERROR('#м'); +} +var \u043D = 1; +if (н !== 1) { + $ERROR('#н'); +} +var \u043E = 1; +if (о !== 1) { + $ERROR('#о'); +} +var \u043F = 1; +if (п !== 1) { + $ERROR('#п'); +} +var \u0440 = 1; +if (р !== 1) { + $ERROR('#р'); +} +var \u0441 = 1; +if (с !== 1) { + $ERROR('#с'); +} +var \u0442 = 1; +if (т !== 1) { + $ERROR('#т'); +} +var \u0443 = 1; +if (у !== 1) { + $ERROR('#у'); +} +var \u0444 = 1; +if (ф !== 1) { + $ERROR('#ф'); +} +var \u0445 = 1; +if (х !== 1) { + $ERROR('#х'); +} +var \u0446 = 1; +if (ц !== 1) { + $ERROR('#ц'); +} +var \u0447 = 1; +if (ч !== 1) { + $ERROR('#ч'); +} +var \u0448 = 1; +if (ш !== 1) { + $ERROR('#ш'); +} +var \u0449 = 1; +if (щ !== 1) { + $ERROR('#щ'); +} +var \u044A = 1; +if (ъ !== 1) { + $ERROR('#ъ'); +} +var \u044B = 1; +if (ы !== 1) { + $ERROR('#ы'); +} +var \u044C = 1; +if (ь !== 1) { + $ERROR('#ь'); +} +var \u044D = 1; +if (э !== 1) { + $ERROR('#э'); +} +var \u044E = 1; +if (ю !== 1) { + $ERROR('#ю'); +} +var \u044F = 1; +if (я !== 1) { + $ERROR('#я'); +} +var \u0451 = 1; +if (ё !== 1) { + $ERROR('#ё'); +} + diff --git a/js/src/tests/test262/ch07/7.6/S7.6_A4.3_T1.js b/js/src/tests/test262/ch07/7.6/S7.6_A4.3_T1.js new file mode 100644 index 000000000..ab13aa253 --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/S7.6_A4.3_T1.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Correct interpretation of DIGITS + * + * @path ch07/7.6/S7.6_A4.3_T1.js + * @description Identifier is $+ANY_DIGIT + */ + +//CHECK#0-9 +var $\u0030 = 0; +if ($0 !== 0) { + $ERROR('#0: $\\u0030 = 0; $0 === 0'); +} +var $\u0031 = 1; +if ($1 !== 1) { + $ERROR('#1: $\\u0031 = 1; $1 === 1'); +} +var $\u0032 = 2; +if ($2 !== 2) { + $ERROR('#2: $\\u0032 = 2; $2 === 2'); +} +var $\u0033 = 3; +if ($3 !== 3) { + $ERROR('#3: $\\u0033 = 3; $3 === 3'); +} +var $\u0034 = 4; +if ($4 !== 4) { + $ERROR('#4: $\\u0034 = 4; $4 === 4'); +} +var $\u0035 = 5; +if ($5 !== 5) { + $ERROR('#5: $\\u0035 = 5; $5 === 5'); +} +var $\u0036 = 6; +if ($6 !== 6) { + $ERROR('#6: $\\u0036 = 6; $6 === 6'); +} +var $\u0037 = 7; +if ($7 !== 7) { + $ERROR('#7: $\\u0037 = 7; $7 === 7'); +} +var $\u0038 = 8; +if ($8 !== 8) { + $ERROR('#8: $\\u0038 = 8; $8 === 8'); +} +var $\u0039 = 9; +if ($9 !== 9) { + $ERROR('#9: $\\u0039 = 9; $9 === 9'); +} + diff --git a/js/src/tests/test262/ch07/7.6/browser.js b/js/src/tests/test262/ch07/7.6/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/browser.js diff --git a/js/src/tests/test262/ch07/7.6/shell.js b/js/src/tests/test262/ch07/7.6/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.6/shell.js |