diff options
Diffstat (limited to 'js/src/tests/test262/ch07/7.6/7.6.1')
226 files changed, 6087 insertions, 0 deletions
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 |