summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/types
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/test262/language/types/boolean/S8.3_A1_T1.js30
-rw-r--r--js/src/tests/test262/language/types/boolean/S8.3_A1_T2.js74
-rw-r--r--js/src/tests/test262/language/types/boolean/S8.3_A2.1.js16
-rw-r--r--js/src/tests/test262/language/types/boolean/S8.3_A2.2.js16
-rw-r--r--js/src/tests/test262/language/types/boolean/S8.3_A3.js42
-rw-r--r--js/src/tests/test262/language/types/boolean/browser.js0
-rw-r--r--js/src/tests/test262/language/types/boolean/shell.js0
-rw-r--r--js/src/tests/test262/language/types/browser.js0
-rw-r--r--js/src/tests/test262/language/types/list/S8.8_A2_T1.js19
-rw-r--r--js/src/tests/test262/language/types/list/S8.8_A2_T2.js19
-rw-r--r--js/src/tests/test262/language/types/list/S8.8_A2_T3.js19
-rw-r--r--js/src/tests/test262/language/types/list/browser.js0
-rw-r--r--js/src/tests/test262/language/types/list/shell.js0
-rw-r--r--js/src/tests/test262/language/types/null/S8.2_A1_T1.js16
-rw-r--r--js/src/tests/test262/language/types/null/S8.2_A1_T2.js16
-rw-r--r--js/src/tests/test262/language/types/null/S8.2_A2.js16
-rw-r--r--js/src/tests/test262/language/types/null/S8.2_A3.js24
-rw-r--r--js/src/tests/test262/language/types/null/browser.js0
-rw-r--r--js/src/tests/test262/language/types/null/shell.js0
-rw-r--r--js/src/tests/test262/language/types/number/8.5.1.js64
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A1.js21
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A10_T1.js12
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A10_T2.js15
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A11_T1.js17
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A11_T2.js38
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A12.1.js23
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A12.2.js17
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A13_T2.js28
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A14_T1.js20
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A14_T2.js20
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A2.1.js19
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A2.2.js19
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A3.js28
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A4_T1.js12
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A4_T2.js16
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A5.js49
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A6.js28
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A7.js28
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A8.js21
-rw-r--r--js/src/tests/test262/language/types/number/S8.5_A9.js17
-rw-r--r--js/src/tests/test262/language/types/number/browser.js0
-rw-r--r--js/src/tests/test262/language/types/number/shell.js0
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.1_A1.js17
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.1_A2.js17
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.1_A3.js29
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A1.js74
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A2.js40
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A3.js21
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A4.js56
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A5_T1.js33
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A5_T2.js33
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A5_T3.js32
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A5_T4.js33
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A6.js30
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A7.js16
-rw-r--r--js/src/tests/test262/language/types/object/S8.6.2_A8.js24
-rw-r--r--js/src/tests/test262/language/types/object/S8.6_A2_T1.js21
-rw-r--r--js/src/tests/test262/language/types/object/S8.6_A2_T2.js26
-rw-r--r--js/src/tests/test262/language/types/object/S8.6_A3_T1.js20
-rw-r--r--js/src/tests/test262/language/types/object/S8.6_A3_T2.js26
-rw-r--r--js/src/tests/test262/language/types/object/S8.6_A4_T1.js57
-rw-r--r--js/src/tests/test262/language/types/object/browser.js0
-rw-r--r--js/src/tests/test262/language/types/object/shell.js0
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-1-s-strict.js18
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-2-s.js15
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-3-1-s.js11
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-3-a-1gs-strict.js17
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-3-a-2gs-strict.js18
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-3-s-strict.js21
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-4-s-strict.js22
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-5-s-strict.js19
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-6-s.js20
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-7-s.js22
-rw-r--r--js/src/tests/test262/language/types/reference/8.7.2-8-s.js17
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7.1_A1.js30
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7.1_A2.js32
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7.2_A1_T1.js16
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7.2_A1_T2.js16
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7.2_A2.js29
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7.2_A3.js28
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7_A1.js32
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7_A2.js42
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7_A3.js31
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7_A4.js32
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7_A5_T1.js54
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7_A5_T2.js54
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7_A6.js28
-rw-r--r--js/src/tests/test262/language/types/reference/S8.7_A7.js34
-rw-r--r--js/src/tests/test262/language/types/reference/browser.js0
-rw-r--r--js/src/tests/test262/language/types/reference/get-value-prop-base-primitive-realm.js38
-rw-r--r--js/src/tests/test262/language/types/reference/get-value-prop-base-primitive.js31
-rw-r--r--js/src/tests/test262/language/types/reference/put-value-prop-base-primitive-realm.js51
-rw-r--r--js/src/tests/test262/language/types/reference/put-value-prop-base-primitive.js49
-rw-r--r--js/src/tests/test262/language/types/reference/shell.js0
-rw-r--r--js/src/tests/test262/language/types/shell.js0
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A1.js48
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A10.js37
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A11.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A12.js19
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A13_T1.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A13_T2.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A13_T3.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A14_T1.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A14_T2.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A14_T3.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A2.js28
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A3.js19
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A4.js19
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A5.js20
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A6.1.js19
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A6.2.js19
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A7.1.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A7.2.js18
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A7.3.js16
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A7.4.js17
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A8.js46
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A9_T1.js37
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A9_T2.js64
-rw-r--r--js/src/tests/test262/language/types/string/S8.4_A9_T3.js45
-rw-r--r--js/src/tests/test262/language/types/string/browser.js0
-rw-r--r--js/src/tests/test262/language/types/string/shell.js0
-rw-r--r--js/src/tests/test262/language/types/undefined/S8.1_A1_T1.js13
-rw-r--r--js/src/tests/test262/language/types/undefined/S8.1_A1_T2.js25
-rw-r--r--js/src/tests/test262/language/types/undefined/S8.1_A2_T1.js36
-rw-r--r--js/src/tests/test262/language/types/undefined/S8.1_A2_T2.js27
-rw-r--r--js/src/tests/test262/language/types/undefined/S8.1_A3_T1.js16
-rw-r--r--js/src/tests/test262/language/types/undefined/S8.1_A3_T2.js17
-rw-r--r--js/src/tests/test262/language/types/undefined/S8.1_A4.js15
-rw-r--r--js/src/tests/test262/language/types/undefined/S8.1_A5.js23
-rw-r--r--js/src/tests/test262/language/types/undefined/browser.js0
-rw-r--r--js/src/tests/test262/language/types/undefined/shell.js0
131 files changed, 3022 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/types/boolean/S8.3_A1_T1.js b/js/src/tests/test262/language/types/boolean/S8.3_A1_T1.js
new file mode 100644
index 0000000000..736c4ed400
--- /dev/null
+++ b/js/src/tests/test262/language/types/boolean/S8.3_A1_T1.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The Boolean type have two values, called true and false
+es5id: 8.3_A1_T1
+description: Assign true and false to variables
+---*/
+
+if (x !== undefined) {
+ throw new Test262Error("#0 x !== undefined, but actual is "+ x);
+}
+
+////////////////////////////////////////////////////////////////////////
+// CHECK#1
+var x = true;
+var y = false;
+
+if (x !== true) {
+ throw new Test262Error("#1.1 x !== true, but actual is "+ x);
+}
+
+if (y !== false) {
+ throw new Test262Error("#1.1 y !== false, but actual is "+ y);
+}
+
+//
+////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/boolean/S8.3_A1_T2.js b/js/src/tests/test262/language/types/boolean/S8.3_A1_T2.js
new file mode 100644
index 0000000000..1d23f46d38
--- /dev/null
+++ b/js/src/tests/test262/language/types/boolean/S8.3_A1_T2.js
@@ -0,0 +1,74 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The Boolean type have two values, called true and false
+es5id: 8.3_A1_T2
+description: Check type of true/false and its equality
+---*/
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (typeof(true) !== "boolean") {
+ throw new Test262Error('#1: typeof(true) === "boolean"');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#2
+if (typeof(true) != "boolean") {
+ throw new Test262Error('#2: typeof(true) == "boolean"');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#3
+if (typeof(false) !== "boolean") {
+ throw new Test262Error('#3: typeof(false) === "boolean"');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#4
+if (typeof(false) != "boolean") {
+ throw new Test262Error('#4: typeof(false) == "boolean"');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#5
+if (true === false) {
+ throw new Test262Error('#5: true !== false');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#6
+if (true == false) {
+ throw new Test262Error('#6: true != false');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#7
+if (false === true) {
+ throw new Test262Error('#7: false !== true');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#8
+if (false == true) {
+ throw new Test262Error('#8: false != true');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/boolean/S8.3_A2.1.js b/js/src/tests/test262/language/types/boolean/S8.3_A2.1.js
new file mode 100644
index 0000000000..6ad95b98c1
--- /dev/null
+++ b/js/src/tests/test262/language/types/boolean/S8.3_A2.1.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The true is reserved word
+es5id: 8.3_A2.1
+description: Checking if execution of "true=1" fails
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+true = 1;
diff --git a/js/src/tests/test262/language/types/boolean/S8.3_A2.2.js b/js/src/tests/test262/language/types/boolean/S8.3_A2.2.js
new file mode 100644
index 0000000000..e512893e82
--- /dev/null
+++ b/js/src/tests/test262/language/types/boolean/S8.3_A2.2.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The false is reserved word
+es5id: 8.3_A2.2
+description: Checking if execution of "false=0" fails
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+false = 0;
diff --git a/js/src/tests/test262/language/types/boolean/S8.3_A3.js b/js/src/tests/test262/language/types/boolean/S8.3_A3.js
new file mode 100644
index 0000000000..dd9a46b6dd
--- /dev/null
+++ b/js/src/tests/test262/language/types/boolean/S8.3_A3.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Applaing negation to boolean works well
+es5id: 8.3_A3
+description: Check not false equals true, not true equals false
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!false !== true){
+ throw new Test262Error('#1: !false === true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (!false != true){
+ throw new Test262Error('#2: !false == true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (!true !== false){
+ throw new Test262Error('#3: !true === false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (!true != false){
+ throw new Test262Error('#4: !true == false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/boolean/browser.js b/js/src/tests/test262/language/types/boolean/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/boolean/browser.js
diff --git a/js/src/tests/test262/language/types/boolean/shell.js b/js/src/tests/test262/language/types/boolean/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/boolean/shell.js
diff --git a/js/src/tests/test262/language/types/browser.js b/js/src/tests/test262/language/types/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/browser.js
diff --git a/js/src/tests/test262/language/types/list/S8.8_A2_T1.js b/js/src/tests/test262/language/types/list/S8.8_A2_T1.js
new file mode 100644
index 0000000000..fa5c12c08e
--- /dev/null
+++ b/js/src/tests/test262/language/types/list/S8.8_A2_T1.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Values of the List type are simply ordered sequences of values
+es5id: 8.8_A2_T1
+description: Call function __mFunc(1,2,3) with 3 arguments
+---*/
+
+function __mFunc(){return arguments.length;};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__mFunc(1,2,3) !== 3){
+ throw new Test262Error('#1: function __mFunc(){return arguments.length;}; __mFunc(1,2,3) === 3. Actual: ' + (__mFunc(1,2,3)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/list/S8.8_A2_T2.js b/js/src/tests/test262/language/types/list/S8.8_A2_T2.js
new file mode 100644
index 0000000000..a2421d3ebd
--- /dev/null
+++ b/js/src/tests/test262/language/types/list/S8.8_A2_T2.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Values of the List type are simply ordered sequences of values
+es5id: 8.8_A2_T2
+description: Call function __mFunc([,,]) with 1 arguments
+---*/
+
+function __mFunc(){return arguments.length;};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__mFunc([,,]) !== 1){
+ throw new Test262Error('#1: function __mFunc(){return arguments.length;}; __mFunc([,,]) === 1. Actual: ' + (__mFunc([,,])));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/list/S8.8_A2_T3.js b/js/src/tests/test262/language/types/list/S8.8_A2_T3.js
new file mode 100644
index 0000000000..7fddbd72f5
--- /dev/null
+++ b/js/src/tests/test262/language/types/list/S8.8_A2_T3.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Values of the List type are simply ordered sequences of values
+es5id: 8.8_A2_T3
+description: Call function, that concatenate all its arguments
+---*/
+
+function __mFunc(){var __accum=""; for (var i = 0; i < arguments.length; ++i){__accum += arguments[i]};return __accum;};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__mFunc("A","B","C","D","E","F") !== "ABCDEF"){
+ throw new Test262Error('#1: function __mFunc(){var __accum=""; for (var i = 0; i < arguments.length; ++i){__accum += arguments[i]};return __accum;}; __mFunc("A","B","C","D","E","F") === "ABCDEF". Actual: ' + (__mFunc("A","B","C","D","E","F")));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/list/browser.js b/js/src/tests/test262/language/types/list/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/list/browser.js
diff --git a/js/src/tests/test262/language/types/list/shell.js b/js/src/tests/test262/language/types/list/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/list/shell.js
diff --git a/js/src/tests/test262/language/types/null/S8.2_A1_T1.js b/js/src/tests/test262/language/types/null/S8.2_A1_T1.js
new file mode 100644
index 0000000000..84c6fdf264
--- /dev/null
+++ b/js/src/tests/test262/language/types/null/S8.2_A1_T1.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The Null Type has one value, called null
+es5id: 8.2_A1_T1
+description: Checking if execution of "var x = null" passes
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var x = null;
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/null/S8.2_A1_T2.js b/js/src/tests/test262/language/types/null/S8.2_A1_T2.js
new file mode 100644
index 0000000000..c9ec6989e7
--- /dev/null
+++ b/js/src/tests/test262/language/types/null/S8.2_A1_T2.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The Null Type has one value, called null
+es5id: 8.2_A1_T2
+description: Checking if execution of "x = null" passes
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var x = null;
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/null/S8.2_A2.js b/js/src/tests/test262/language/types/null/S8.2_A2.js
new file mode 100644
index 0000000000..db9c83efa9
--- /dev/null
+++ b/js/src/tests/test262/language/types/null/S8.2_A2.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The null is resrved word
+es5id: 8.2_A2
+description: Checking if execution of "var null" fails
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var null;
diff --git a/js/src/tests/test262/language/types/null/S8.2_A3.js b/js/src/tests/test262/language/types/null/S8.2_A3.js
new file mode 100644
index 0000000000..30fcadbca5
--- /dev/null
+++ b/js/src/tests/test262/language/types/null/S8.2_A3.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ For the keyword null the typeof operator returns the "object"
+ See also
+ http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Operators:Special_Operators:typeof_Operator
+ and
+ http://bugs.ecmascript.org/ticket/250
+ for example
+es5id: 8.2_A3
+description: Check type of null
+---*/
+
+//////////////////////////////////////////////////////////////
+// CHECK#1
+if (typeof(null) !== "object") {
+ throw new Test262Error('#1: typeof null === "object". Actual: ' + (typeof null));
+}
+//
+/////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/null/browser.js b/js/src/tests/test262/language/types/null/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/null/browser.js
diff --git a/js/src/tests/test262/language/types/null/shell.js b/js/src/tests/test262/language/types/null/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/null/shell.js
diff --git a/js/src/tests/test262/language/types/number/8.5.1.js b/js/src/tests/test262/language/types/number/8.5.1.js
new file mode 100644
index 0000000000..2425679058
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/8.5.1.js
@@ -0,0 +1,64 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.5.1
+description: Valid Number ranges
+---*/
+
+// Check range support for Number values (IEEE 754 64-bit floats having the form s*m*2**e)
+//
+// For normalized floats, sign (s) is +1 or -1, m (mantisa) is a positive integer less
+// than 2**53 but not less than 2**52 and e (exponent) is an integer ranging from -1074 to 971
+//
+// For denormalized floats, s is +1 or -1, m is a positive integer less than 2**52, and
+// e is -1074
+//
+// Below 64-bit float values shown for informational purposes. Values may be positive or negative.
+// Infinity >= ~1.797693134862315907729305190789e+308 >= 2**1024
+// MAX_NORM = ~1.797693134862315708145274237317e+308 = (2**53 - 1) * (2**-52) * (2**1023) = (2**53-1) * (2**971) = (2**1024) - (2**971)
+// MIN_NORM = ~2.2250738585072013830902327173324e-308 = 2**-1022
+// MAX_DENORM = ~2.2250738585072008890245868760859e-308 = MIN_NORM - MIN_DENORM = (2**-1022) - (2**-1074)
+// MIN_DENORM = ~4.9406564584124654417656879286822e-324 = 2**-1074
+
+// Fill an array with 2 to the power of (0 ... -1075)
+var value = 1;
+var floatValues = new Array(1076);
+for(var power = 0; power <= 1075; power++){
+ floatValues[power] = value;
+ // Use basic math operations for testing, which are required to support 'gradual underflow' rather
+ // than Math.pow etc..., which are defined as 'implementation dependent'.
+ value = value * 0.5;
+}
+
+// The last value is below min denorm and should round to 0, everything else should contain a value
+if(floatValues[1075] !== 0) {
+ throw new Test262Error("Value after min denorm should round to 0");
+}
+
+// Validate the last actual value is min denorm
+if(floatValues[1074] !== 4.9406564584124654417656879286822e-324) {
+ throw new Test262Error("Min denorm value is incorrect: " + floatValues[1074]);
+}
+
+// Validate that every value is half the value before it up to 1
+for(var index = 1074; index > 0; index--){
+ if(floatValues[index] === 0){
+ throw new Test262Error("2**-" + index + " should not be 0");
+ }
+ if(floatValues[index - 1] !== (floatValues[index] * 2)){
+ throw new Test262Error("Value should be double adjacent value at index " + index);
+ }
+}
+
+// Max norm should be supported and compare less than inifity
+if(!(1.797693134862315708145274237317e+308 < Infinity)){
+ throw new Test262Error("Max Number value 1.797693134862315708145274237317e+308 should not overflow to infinity");
+}
+
+// Numbers closer to 2**1024 then max norm should overflow to infinity
+if(!(1.797693134862315808e+308 === +Infinity)){
+ throw new Test262Error("1.797693134862315808e+308 did not resolve to Infinity");
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A1.js b/js/src/tests/test262/language/types/number/S8.5_A1.js
new file mode 100644
index 0000000000..cf1e73445a
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A1.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: NaN !== NaN
+es5id: 8.5_A1
+description: Compare NaN with NaN
+---*/
+
+var x = Number.NaN;
+var x_ = Number.NaN;
+
+///////////////////////////////////////////////////////
+// CHECK #1
+if (x === x_){
+ throw new Test262Error('#1: NaN !== NaN ');
+}
+//
+//////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A10_T1.js b/js/src/tests/test262/language/types/number/S8.5_A10_T1.js
new file mode 100644
index 0000000000..3fd8caa61f
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A10_T1.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.
+
+/*---
+info: Infinity is not a keyword
+es5id: 8.5_A10
+description: Create variable entitled Infinity
+---*/
+
+var Infinity;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A10_T2.js b/js/src/tests/test262/language/types/number/S8.5_A10_T2.js
new file mode 100644
index 0000000000..2f9615e87d
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A10_T2.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.
+
+/*---
+info: Infinity is not a keyword
+es5id: 8.5_A10
+description: Create variable entitled Infinity
+flags: [noStrict]
+---*/
+
+var Infinity=1.0;
+Infinity='asdf';
+Infinity=true;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A11_T1.js b/js/src/tests/test262/language/types/number/S8.5_A11_T1.js
new file mode 100644
index 0000000000..cf2314346a
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A11_T1.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The integer 0 has two representations, +0 and -0
+es5id: 8.5_A11_T1
+description: Check 1.0/p_zero !== 1.0/n_zero
+---*/
+
+var p_zero=+0;
+var n_zero=-0;
+
+if (1.0/p_zero === 1.0/n_zero){
+ throw new Test262Error('#1: var p_zero=+0; var n_zero=-0; 1.0/p_zero !== 1.0/n_zero');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A11_T2.js b/js/src/tests/test262/language/types/number/S8.5_A11_T2.js
new file mode 100644
index 0000000000..050b8186eb
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A11_T2.js
@@ -0,0 +1,38 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The integer 0 has two representations, +0 and -0
+es5id: 8.5_A11_T2
+description: Compare positive_zero and negative_zero
+---*/
+
+var p_zero=+0;
+var n_zero=-0;
+
+//CHECK #1
+if ((p_zero == n_zero) !== true){
+ throw new Test262Error('#1: var p_zero=+0; var n_zero=-0; p_zero != n_zero');
+}
+
+//CHECK #2
+if ((n_zero == 0) !== true){
+ throw new Test262Error('#2: var p_zero=+0; var n_zero=-0; n_zero == 0');
+}
+
+//CHECK #3
+if ((p_zero == -0) !== true){
+ throw new Test262Error('#3: var p_zero=+0; var n_zero=-0; p_zero == -0');
+}
+
+//CHECK #4
+if ((p_zero === 0) !== true){
+ throw new Test262Error('#4: var p_zero=+0; var n_zero=-0; p_zero === 0');
+}
+
+//CHECK #5
+if ((n_zero === -0) !== true){
+ throw new Test262Error('#5: var p_zero=+0; var n_zero=-0; n_zero === -0');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A12.1.js b/js/src/tests/test262/language/types/number/S8.5_A12.1.js
new file mode 100644
index 0000000000..ba5a48f081
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A12.1.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: +Infinity and Infinity are the same as Number.POSITIVE_INFINITY
+es5id: 8.5_A12.1
+description: Compare Infinity and +Infinity with Number.POSITIVE_INFINITY
+---*/
+
+var p_inf=+Infinity;
+var inf=Infinity;
+
+//CHECK #1
+if (p_inf!==Number.POSITIVE_INFINITY){
+ throw new Test262Error('#1: +Infinity is the same as Number.POSITIVE_INFINITY');
+}
+
+//CHECK #2
+if (inf!==Number.POSITIVE_INFINITY){
+ throw new Test262Error('#2: Infinity is the same as Number.POSITIVE_INFINITY');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A12.2.js b/js/src/tests/test262/language/types/number/S8.5_A12.2.js
new file mode 100644
index 0000000000..d2288234f7
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A12.2.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: -Infinity is the same as Number.NEGATIVE_INFINITY
+es5id: 8.5_A12.2
+description: Compare -Infinity with Number.NEGATIVE_INFINITY
+---*/
+
+var n_inf=-Infinity;
+
+//CHECK #1
+if (n_inf !== Number.NEGATIVE_INFINITY){
+ throw new Test262Error('#1: -Infinity is the same as Number.NEGATIVE_INFINITY');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A13_T2.js b/js/src/tests/test262/language/types/number/S8.5_A13_T2.js
new file mode 100644
index 0000000000..551f2b71cb
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A13_T2.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Finite nonzero values that are Normalised having the form s*m*2**e
+ where s is +1 or -1, m is a positive integer less than 2**53 but not
+ less than s**52 and e is an integer ranging from -1074 to 971
+es5id: 8.5_A13_T2
+description: Finite Non zero values where e is 971
+---*/
+
+//CHECK #1
+if ((1*(Math.pow(2,52))*(Math.pow(2,971))) !== 8.98846567431158e+307){
+ throw new Test262Error('#1: (1*(Math.pow(2,52))*(Math.pow(2,971))) === 8.98846567431158e+307. Actual: ' + ((1*(Math.pow(2,52))*(Math.pow(2,971)))));
+}
+
+//CHECK #2
+if ((1*((Math.pow(2,53))-1)*(Math.pow(2,971))) !== 1.7976931348623157e+308){
+ throw new Test262Error('#2: (1*((Math.pow(2,53))-1)*(Math.pow(2,971))) === 1.7976931348623157e+308. Actual: ' + ((1*((Math.pow(2,53))-1)*(Math.pow(2,971)))));
+}
+
+//CHECK #3
+if ((-1*(Math.pow(2,52))*(Math.pow(2,971))) !== -8.98846567431158e+307){
+ throw new Test262Error('#3: (-1*(Math.pow(2,52))*(Math.pow(2,971))) === -8.98846567431158e+307. Actual: ' + ((-1*(Math.pow(2,52))*(Math.pow(2,971)))));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A14_T1.js b/js/src/tests/test262/language/types/number/S8.5_A14_T1.js
new file mode 100644
index 0000000000..070ebc481c
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A14_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When number absolute value is bigger of 2**1024 should convert to Infinity
+es5id: 8.5_A14_T1
+description: Create number bigger of 2**1024
+---*/
+
+//CHECK #1
+if (1e+308*2 !== Infinity){
+ throw new Test262Error('#1: 1e+308*2 === Infinity. Actual: ' + (1e+308*2));
+}
+
+//CHECK #2
+if ((1*(Math.pow(2,53))*(Math.pow(2,971))) !== Infinity){
+ throw new Test262Error('#2: (1*(Math.pow(2,53))*(Math.pow(2,971))) === Infinity. Actual: ' + ((1*(Math.pow(2,53))*(Math.pow(2,971)))));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A14_T2.js b/js/src/tests/test262/language/types/number/S8.5_A14_T2.js
new file mode 100644
index 0000000000..7003094f96
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A14_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When number absolute value is bigger of 2**1024 should convert to Infinity
+es5id: 8.5_A14_T2
+description: Create number smaller of -2**1024
+---*/
+
+//CHECK #1
+if (-1e+308*3 !== -Infinity){
+ throw new Test262Error('#1: -1e+308*3 === Infinity. Actual: ' + (-1e+308*3));
+}
+
+//CHECK #2
+if ((-1*(Math.pow(2,53))*(Math.pow(2,971))) !== -Infinity){
+ throw new Test262Error('#2: (-1*(Math.pow(2,53))*(Math.pow(2,971))) === Infinity. Actual: ' + ((-1*(Math.pow(2,53))*(Math.pow(2,971)))));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A2.1.js b/js/src/tests/test262/language/types/number/S8.5_A2.1.js
new file mode 100644
index 0000000000..5311a0b2b7
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A2.1.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Number type represented as the double precision 64-bit format IEEE 754
+es5id: 8.5_A2.1
+description: Use 2^53 + 2 number and do some operation with it
+---*/
+
+var x = 9007199254740994.0; /* 2^53 + 2 */
+var y = 1.0 - 1/65536.0;
+var z = x + y;
+var d = z - x;
+
+if (d !== 0){
+ throw new Test262Error('#1: var x = 9007199254740994.0; var y = 1.0 - 1/65536.0; var z = x + y; var d = z - x; d === 0. Actual: ' + (d));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A2.2.js b/js/src/tests/test262/language/types/number/S8.5_A2.2.js
new file mode 100644
index 0000000000..a6513de42d
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A2.2.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Number type represented as the extended precision 64-bit format IEEE 754
+es5id: 8.5_A2.2
+description: Use 2^53 + 2 number and do some operation with it
+---*/
+
+var x = 9007199254740994.0; /* 2^53 + 2 */
+var y = 1.0 - 1/65536.0;
+var z = x + y;
+var d = z - x;
+
+if (d === 2){
+ throw new Test262Error('#1: var x = 9007199254740994.0; var y = 1.0 - 1/65536.0; var z = x + y; var d = z - x; d !== 2');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A3.js b/js/src/tests/test262/language/types/number/S8.5_A3.js
new file mode 100644
index 0000000000..134465e2ee
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A3.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: NaN expression has a type Number
+es5id: 8.5_A3
+description: Check type of NaN
+---*/
+
+var x=NaN;
+
+///////////////////////////////////////////////////////
+// CHECK#1
+if (typeof(x) !== "number"){
+ throw new Test262Error('#1: var x=NaN; typeof(x) === "number". Actual: ' + (typeof(x)));
+}
+//
+//////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////
+// CHECK#2
+if (typeof(NaN) !== "number"){
+ throw new Test262Error('#2: typeof(NaN) === "number". Actual: ' + (typeof(NaN)));
+}
+//
+//////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A4_T1.js b/js/src/tests/test262/language/types/number/S8.5_A4_T1.js
new file mode 100644
index 0000000000..15ecc388e0
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A4_T1.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.
+
+/*---
+info: NaN is not a keyword
+es5id: 8.5_A4
+description: Create variable entitled NaN
+---*/
+
+var NaN;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A4_T2.js b/js/src/tests/test262/language/types/number/S8.5_A4_T2.js
new file mode 100644
index 0000000000..aab1baa9b7
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A4_T2.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: NaN is not a keyword
+es5id: 8.5_A4
+description: Create variable entitled NaN
+flags: [noStrict]
+---*/
+
+var NaN=1.0;
+NaN='asdf';
+NaN=true;
+NaN=Number.NaN;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A5.js b/js/src/tests/test262/language/types/number/S8.5_A5.js
new file mode 100644
index 0000000000..cf469bb81d
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A5.js
@@ -0,0 +1,49 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: NaN not greater or equal zero
+es5id: 8.5_A5
+description: Compare NaN with zero
+---*/
+
+var x = NaN;
+var x_geq_0=(x >= 0.0);
+var x_leq_0=(x <= 0.0);
+var x_leq_0_OR_geq_0=(x <= 0.0)||(x >= 0.0);
+var x_geq_0_ADD_leq_0=(x >= 0.0) + (x <= 0.0);
+
+
+///////////////////////////////////////////////////
+// CHECK#1
+if (x_geq_0){
+ throw new Test262Error('#1: NaN not greater or equal zero');
+}
+//
+///////////////////////////////////////////////////
+
+///////////////////////////////////////////////////
+// CHECK#2
+if (x_leq_0){
+ throw new Test262Error('#2: NaN not less or equal zero');
+}
+//
+///////////////////////////////////////////////////
+
+///////////////////////////////////////////////////
+// CHECK#3
+if (x_leq_0_OR_geq_0){
+ throw new Test262Error('#3: NaN not less or equal zero OR greater or equal zero');
+}
+//
+///////////////////////////////////////////////////
+
+///////////////////////////////////////////////////
+// CHECK#4
+if (x_geq_0_ADD_leq_0){
+ throw new Test262Error('#4: NaN not less or equal zero ADD greater or equal zero');
+}
+//
+///////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A6.js b/js/src/tests/test262/language/types/number/S8.5_A6.js
new file mode 100644
index 0000000000..4de2bd59dd
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A6.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: -Infinity expression has a type Number
+es5id: 8.5_A6
+description: Check type of -Infinity
+---*/
+
+var x=-Infinity;
+
+///////////////////////////////////////////////////////
+// CHECK#1
+if (typeof(x) !== "number"){
+ throw new Test262Error('#1: var x=-Infinity; typeof(x) === "number". Actual: ' + (typeof(x)));
+}
+//
+//////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////
+// CHECK#2
+if (typeof(-Infinity) !== "number"){
+ throw new Test262Error('#2: typeof(-Infinity) === "number". Actual: ' + (typeof(-Infinity)));
+}
+//
+//////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A7.js b/js/src/tests/test262/language/types/number/S8.5_A7.js
new file mode 100644
index 0000000000..c6d655662d
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A7.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: +Infinity expression has a type Number
+es5id: 8.5_A7
+description: Check type of +Infinity
+---*/
+
+var x=+Infinity;
+
+///////////////////////////////////////////////////////
+// CHECK#1
+if (typeof(x) !== "number"){
+ throw new Test262Error('#1: var x=+Infinity; typeof(x) === "number". Actual: ' + (typeof(x)));
+}
+//
+//////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////
+// CHECK#2
+if (typeof(+Infinity) !== "number"){
+ throw new Test262Error('#2: typeof(+Infinity) === "number". Actual: ' + (typeof(+Infinity)));
+}
+//
+//////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A8.js b/js/src/tests/test262/language/types/number/S8.5_A8.js
new file mode 100644
index 0000000000..241f259997
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A8.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Infinity is the same as +Infinity
+es5id: 8.5_A8
+description: Compare Infinity and +Infinity
+---*/
+
+var p_inf=+Infinity;
+var inf=Infinity;
+
+///////////////////////////////////////////////////////
+//
+if (p_inf!==inf){
+ throw new Test262Error('#1: Infinity is the same as +Infinity');
+}
+//
+//////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/S8.5_A9.js b/js/src/tests/test262/language/types/number/S8.5_A9.js
new file mode 100644
index 0000000000..722d948607
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/S8.5_A9.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Globally defined variable NaN has not been altered by program execution
+es5id: 8.5_A9
+description: Try alter globally defined variable NaN
+flags: [noStrict]
+---*/
+
+Number.NaN = 1;
+
+if (Number.NaN === 1) {
+ throw new Test262Error('#1: Globally defined variable NaN has not been altered by program execution');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/number/browser.js b/js/src/tests/test262/language/types/number/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/browser.js
diff --git a/js/src/tests/test262/language/types/number/shell.js b/js/src/tests/test262/language/types/number/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/number/shell.js
diff --git a/js/src/tests/test262/language/types/object/S8.6.1_A1.js b/js/src/tests/test262/language/types/object/S8.6.1_A1.js
new file mode 100644
index 0000000000..54ecf7df5d
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.1_A1.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: A property can have attribute ReadOnly like E in Math
+es5id: 8.6.1_A1
+description: Try change Math.E property
+flags: [noStrict]
+---*/
+
+var __e = Math.E;
+Math.E=1;
+if (Math.E !==__e){
+ throw new Test262Error('#1: __e = Math.E; Math.E=1; Math.E ===__e');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.1_A2.js b/js/src/tests/test262/language/types/object/S8.6.1_A2.js
new file mode 100644
index 0000000000..cb73a76a30
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.1_A2.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: A property can have attribute DontEnum like all properties of Number
+es5id: 8.6.1_A2
+description: Try to enumerate properties of Number
+---*/
+
+//CHECK#1
+var count=0;
+for (p in Number) count++;
+if (count > 0){
+ throw new Test262Error('#1: count=0; for (p in Number) count++; count > 0. Actual: ' + (count));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.1_A3.js b/js/src/tests/test262/language/types/object/S8.6.1_A3.js
new file mode 100644
index 0000000000..af085a0cf6
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.1_A3.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ A property can have attribute DontDelete like NaN propertie of Number
+ object
+es5id: 8.6.1_A3
+description: Try to delete Number.NaN
+flags: [noStrict]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (delete Number.NaN !== false){
+ throw new Test262Error('#1: delete Number.NaN === false. Actual: ' + (delete Number.NaN));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (typeof(Number.NaN) === "undefined"){
+ throw new Test262Error('#2: delete Number.NaN; typeof(Number.NaN) !== "undefined" ');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A1.js b/js/src/tests/test262/language/types/object/S8.6.2_A1.js
new file mode 100644
index 0000000000..3ff23fca5e
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A1.js
@@ -0,0 +1,74 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Native ECMAScript objects have an internal property called [[Prototype]]. The value of this property is
+ either null or an object and is used for implementing inheritance
+es5id: 8.6.2_A1
+description: Check [[Prototype]] property of object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var __obj={};
+if (!Object.prototype.isPrototypeOf(__obj)){
+ throw new Test262Error('#1: Native ECMAScript objects have an internal property called [[Prototype]]. ');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//Establish proto (base) object
+/*function ProtoObj(){
+
+};*/
+var protoObj={};
+//Establish foo object
+function FooObj(){};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+// Invoke instance of foo object
+var obj__= new FooObj;
+
+if (!Object.prototype.isPrototypeOf(obj__)){
+ throw new Test262Error('#2.1: protoObj={}; function FooObj(){}; var obj__= new FooObj; Object.prototype.isPrototypeOf(obj__) === true. Actual: ' + (Object.prototype.isPrototypeOf(obj__)));
+};
+
+if (!FooObj.prototype.isPrototypeOf(obj__)){
+ throw new Test262Error('#2.2: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype.isPrototypeOf(obj__) === true. Actual: ' + (FooObj.prototype.isPrototypeOf(obj__)));
+};
+
+if (protoObj.isPrototypeOf(obj__)){
+ throw new Test262Error('#2.3: protoObj={}; function FooObj(){}; var obj__= new FooObj; protoObj.isPrototypeOf(obj__) === false. Actual: ' + (protoObj.isPrototypeOf(obj__)));
+};
+// Establish inheritance from proto object
+FooObj.prototype=protoObj;
+
+if (protoObj.isPrototypeOf(obj__)){
+ throw new Test262Error('#2.4: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype=protoObj; protoObj.isPrototypeOf(obj__) === false. Actual: ' + (protoObj.isPrototypeOf(obj__)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+
+// Invoke instance of foo object
+var __foo=new FooObj;
+
+if (!Object.prototype.isPrototypeOf(__foo)){
+ throw new Test262Error('#3.1: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype=protoObj; var __foo=new FooObj; Object.prototype.isPrototypeOf(__foo) === true. Actual: ' + (Object.prototype.isPrototypeOf(__foo)));
+};
+
+if (!FooObj.prototype.isPrototypeOf(__foo)){
+ throw new Test262Error('#3.2: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype=protoObj; var __foo=new FooObj; FooObj.prototype.isPrototypeOf(__foo) === true. Actual: ' + (FooObj.prototype.isPrototypeOf(__foo)));
+};
+
+if (!protoObj.isPrototypeOf(__foo)){
+ throw new Test262Error('#3.3: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype=protoObj; var __foo=new FooObj; protoObj.isPrototypeOf(__foo) === true. Actual: ' + (protoObj.isPrototypeOf(__foo)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A2.js b/js/src/tests/test262/language/types/object/S8.6.2_A2.js
new file mode 100644
index 0000000000..d318fc65d6
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A2.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Properties of the [[Prototype]] object
+ are visible as properties of the child object for the purposes of get access, but not for put access
+es5id: 8.6.2_A2
+description: >
+ Check visibility properties of the child object for the purposes
+ of get access, but not for put access
+---*/
+
+//Establish foo object
+function FooObj(){};
+FooObj.prototype.prop="some";
+
+// Invoke instance of foo object
+var foo= new FooObj;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (foo.prop !== "some"){
+ throw new Test262Error('#1: function FooObj(){}; FooObj.prototype.prop="some"; var foo= new FooObj; foo.prop === "some". Actual: ' + (foo.prop));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+foo.prop=true;
+// Invoke another instance of foo object
+var foo__ = new FooObj;
+if (foo__.prop !== "some"){
+ throw new Test262Error('#2: function FooObj(){}; FooObj.prototype.prop="some"; var foo= new FooObj; foo.prop=true; var foo__ = new FooObj; foo__.prop === "some". Actual: ' + (foo__.prop));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A3.js b/js/src/tests/test262/language/types/object/S8.6.2_A3.js
new file mode 100644
index 0000000000..cecd3cf998
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A3.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ The specification does not provide any means for a program to access
+ [[class]] value except through Object.prototype.toString
+es5id: 8.6.2_A3
+description: Get [[class]] value except through Object.prototype.toString
+---*/
+
+var __obj={};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toString() !== "[object " + 'Object' + "]"){
+ throw new Test262Error('#1: var __obj={}; __obj.toString() === "[object " + \'Object\' + "]". Actual: ' + (__obj.toString()));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A4.js b/js/src/tests/test262/language/types/object/S8.6.2_A4.js
new file mode 100644
index 0000000000..b24ea13267
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A4.js
@@ -0,0 +1,56 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ [[HasInstance]] returns a boolean value indicating whether Value
+ delegates behaviour to this object
+es5id: 8.6.2_A4
+description: >
+ Check that the obj instance of Object, but not instance of
+ Function, String, Number, Array
+---*/
+
+var __obj={};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(__obj instanceof Object)) {
+ throw new Test262Error('#1: var __obj={}; (__obj instanceof Object) === true. Actual: ' + ((__obj instanceof Object)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__obj instanceof Function) {
+ throw new Test262Error('#2: var __obj={}; (__obj instanceof Function) === false. Actual: ' + ((__obj instanceof Function)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__obj instanceof String) {
+ throw new Test262Error('#3: var __obj={}; (__obj instanceof String) === false. Actual: ' + ((__obj instanceof String)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__obj instanceof Number) {
+ throw new Test262Error('#4: var __obj={}; (__obj instanceof Number) === false. Actual: ' + ((__obj instanceof Number)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__obj instanceof Array) {
+ throw new Test262Error('#5: var __obj={}; (__obj instanceof Array) === false. Actual: ' + ((__obj instanceof Array)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A5_T1.js b/js/src/tests/test262/language/types/object/S8.6.2_A5_T1.js
new file mode 100644
index 0000000000..d30f3b0034
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A5_T1.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: "[[Call]] executes code associated with the object"
+es5id: 8.6.2_A5_T1
+description: >
+ Call function-property of object, property defined as testScreen
+ = {touch:function(){count++}}
+---*/
+
+this.count=0;
+
+var testScreen = {touch:function(){count++}};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+testScreen.touch();
+if (count !==1) {
+ throw new Test262Error('#1: this.count=0; testScreen = {touch:function(){count++}}; testScreen.touch(); count === 1. Actual: ' + (count));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+testScreen['touch']();
+if (count !==2) {
+ throw new Test262Error('#2: this.count=0; testScreen = {touch:function(){count++}}; testScreen.touch(); testScreen[\'touch\'](); count === 2. Actual: ' + (count));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A5_T2.js b/js/src/tests/test262/language/types/object/S8.6.2_A5_T2.js
new file mode 100644
index 0000000000..5d69d10c53
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A5_T2.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: "[[Call]] executes code associated with the object"
+es5id: 8.6.2_A5_T2
+description: >
+ Call function-property of object, property defined as
+ seat['move']=function(){position++}
+---*/
+
+this.position=0;
+var seat = {};
+seat['move']=function(){position++};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+seat.move();
+if (position !==1) {
+ throw new Test262Error('#1: this.position=0; seat = {}; seat[\'move\']=function(){position++}; seat.move(); position === 1. Actual: ' + (position));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+seat['move']();
+if (position !==2) {
+ throw new Test262Error('#2: this.position=0; seat = {}; seat[\'move\']=function(){position++}; seat.move(); seat[\'move\'](); position === 2. Actual: ' + (position));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A5_T3.js b/js/src/tests/test262/language/types/object/S8.6.2_A5_T3.js
new file mode 100644
index 0000000000..f1d8a6ee01
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A5_T3.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: "[[Call]] executes code associated with the object"
+es5id: 8.6.2_A5_T3
+description: >
+ Call function-property of global object, property defined as
+ knock=function(){count++}
+---*/
+
+var count=0;
+var knock=function(){count++};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+knock();
+if (count !==1) {
+ throw new Test262Error('#1: count=0; knock=function(){count++}; knock(); count === 1. Actual: ' + (count));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+this['knock']();
+if (count !==2) {
+ throw new Test262Error('#2: count=0; knock=function(){count++}; knock(); this[\'knock\'](); count === 2. Actual: ' + (count));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A5_T4.js b/js/src/tests/test262/language/types/object/S8.6.2_A5_T4.js
new file mode 100644
index 0000000000..fb26cb9ec5
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A5_T4.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: "[[Call]] executes code associated with the object"
+es5id: 8.6.2_A5_T4
+description: >
+ Call function-property of global object, property defined as
+ this['beep']=function(){__count++}
+---*/
+
+var __count=0;
+
+this["beep"]=function(){__count++};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+beep();
+if (__count !==1) {
+ throw new Test262Error('#1: __count=0; this["beep"]=function(){__count++}; beep(); __count === 1. Actual: ' + (__count));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+this["beep"]();
+if (__count !==2) {
+ throw new Test262Error('#2: __count=0; this["beep"]=function(){__count++}; beep(); this["beep"](); __count === 2. Actual: ' + (__count));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A6.js b/js/src/tests/test262/language/types/object/S8.6.2_A6.js
new file mode 100644
index 0000000000..b6f729d70f
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A6.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ [[Construct]] constructs an object. Invoked via the new operator. Objects
+ that implement this internal method are called constructors
+es5id: 8.6.2_A6
+description: Create a few Objects via the new operator
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var objInstance=new Object;
+if (objInstance.constructor !== Object){
+ throw new Test262Error('#1: var objInstance=new Object; objInstance.constructor === Object. Actual: ' + (objInstance.constructor));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+var numInstance=new Number;
+if (numInstance.constructor !== Number){
+ throw new Test262Error('#2: var numInstance=new Number; numInstance.constructor === Number. Actual: ' + (numInstance.constructor));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A7.js b/js/src/tests/test262/language/types/object/S8.6.2_A7.js
new file mode 100644
index 0000000000..32ded83824
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A7.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.
+
+/*---
+info: |
+ Objects that implement internal method [[Construct]] are called
+ constructors. Math object is NOT constructor
+es5id: 8.6.2_A7
+description: Checking if execution of "var objMath=new Math" passes
+---*/
+
+assert.throws(TypeError, function() {
+ var objMath=new Math;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6.2_A8.js b/js/src/tests/test262/language/types/object/S8.6.2_A8.js
new file mode 100644
index 0000000000..2f93fedb2b
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6.2_A8.js
@@ -0,0 +1,24 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.6.2_A8
+description: >
+ It should not be possible to change the [[Prototype]] of a
+ non-extensible object
+---*/
+
+var x = Object.preventExtensions({});
+var y = {};
+try {
+ x.__proto__ = y;
+} catch (err) {
+ // As far as this test is concerned, we allow the above assignment
+ // to fail. This failure does violate the spec and should probably
+ // be tested separately.
+}
+if (Object.getPrototypeOf(x) !== Object.prototype) {
+ throw new Test262Error("Prototype of non-extensible object mutated");
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6_A2_T1.js b/js/src/tests/test262/language/types/object/S8.6_A2_T1.js
new file mode 100644
index 0000000000..1871f0f435
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6_A2_T1.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Do not crash with postincrement custom property
+es5id: 8.6_A2_T1
+description: Try to implement postincrement for custom property
+---*/
+
+var __map={foo:"bar"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+
+__map.foo++;
+assert.sameValue(__map.foo, NaN);
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6_A2_T2.js b/js/src/tests/test262/language/types/object/S8.6_A2_T2.js
new file mode 100644
index 0000000000..74ccd45349
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6_A2_T2.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Do not crash with postincrement custom property
+es5id: 8.6_A2_T2
+description: Try to implement postincrement for not declared custom property
+---*/
+
+var __map={};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+assert.sameValue(__map.foo++, NaN);
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (!("foo" in __map)) {
+ throw new Test262Error('#2: var __map={}; "foo" in __map');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6_A3_T1.js b/js/src/tests/test262/language/types/object/S8.6_A3_T1.js
new file mode 100644
index 0000000000..61a1275f26
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6_A3_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Do not crash with pefixincrement custom property
+es5id: 8.6_A3_T1
+description: Try to implement pefixincrement for custom property
+---*/
+
+var __map={foo:'bar'};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+
+++__map.foo;
+assert.sameValue(__map.foo, NaN);
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6_A3_T2.js b/js/src/tests/test262/language/types/object/S8.6_A3_T2.js
new file mode 100644
index 0000000000..6bf72e8413
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6_A3_T2.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Do not crash with pefixincrement custom property
+es5id: 8.6_A3_T2
+description: Try to implement pefixincrement for not declared custom property
+---*/
+
+var __map={};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+assert.sameValue(++__map.foo, NaN, "++__map.foo");
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (!("foo" in __map)) {
+ throw new Test262Error('#2: var __map={}; "foo" in __map');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/S8.6_A4_T1.js b/js/src/tests/test262/language/types/object/S8.6_A4_T1.js
new file mode 100644
index 0000000000..1e311e2153
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/S8.6_A4_T1.js
@@ -0,0 +1,57 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: An Object is an unordered collection of properties
+es5id: 8.6_A4_T1
+description: Simple using a few custom properties
+---*/
+
+///////////////////////////////////////////////////////
+// CHECK#1
+var obj = {bar:true, some:1, foo:"a"};
+
+var count=0;
+
+for (var property in obj) count++;
+
+if (count !== 3){
+ throw new Test262Error('#1: obj = {bar:true, some:1, foo:"a"}; count=0; for (property in obj) count++; count === 3. Actual: ' + (count));
+}
+//
+////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////
+// CHECK#2
+var obj_ = {bar:true};
+obj_.some = 1;
+obj_.foo = "a";
+
+count=0;
+
+for (property in obj_) count++;
+
+if (count !== 3){
+ throw new Test262Error('#2: obj_ = {bar:true}; obj_.some = 1; obj_.foo = "a"; count=0; for (property in obj_) count++; count === 3. Actual: ' + (count));
+}
+//
+////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////
+// CHECK#3
+var obj__ = new Object();
+obj__.bar = true;
+obj__.some = 1;
+obj__.foo = "a";
+
+count=0;
+
+for (property in obj__) count++;
+
+if (count !== 3){
+ throw new Test262Error('#3: obj__ = new Object(); obj__.bar = true; obj__.some = 1; obj__.foo = "a"; for (property in obj__) count++; count === 3. Actual: ' + (count));
+}
+//
+////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/object/browser.js b/js/src/tests/test262/language/types/object/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/browser.js
diff --git a/js/src/tests/test262/language/types/object/shell.js b/js/src/tests/test262/language/types/object/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/object/shell.js
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-1-s-strict.js b/js/src/tests/test262/language/types/reference/8.7.2-1-s-strict.js
new file mode 100644
index 0000000000..4513bdb656
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-1-s-strict.js
@@ -0,0 +1,18 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-1-s
+description: >
+ Strict Mode - ReferenceError is thrown if LeftHandSide evaluates
+ to an unresolvable Reference
+flags: [onlyStrict]
+---*/
+
+
+assert.throws(ReferenceError, function() {
+ eval("_8_7_2_1 = 11;");
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-2-s.js b/js/src/tests/test262/language/types/reference/8.7.2-2-s.js
new file mode 100644
index 0000000000..607bed0434
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-2-s.js
@@ -0,0 +1,15 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-2-s
+description: >
+ ReferenceError isn't thrown if LeftHandSide evaluates to a resolvable
+ Reference
+---*/
+
+ var b = 11;
+
+assert.sameValue(b, 11, 'b');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-3-1-s.js b/js/src/tests/test262/language/types/reference/8.7.2-3-1-s.js
new file mode 100644
index 0000000000..06db448896
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-3-1-s.js
@@ -0,0 +1,11 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-3-1-s
+description: eval - a property named 'eval' is permitted
+---*/
+
+ var o = { eval: 42};
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-3-a-1gs-strict.js b/js/src/tests/test262/language/types/reference/8.7.2-3-a-1gs-strict.js
new file mode 100644
index 0000000000..7dae24da59
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-3-a-1gs-strict.js
@@ -0,0 +1,17 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-3-a-1gs
+description: >
+ Strict Mode - ReferenceError is thrown if LeftHandSide evaluate to
+ an unresolvable Reference
+flags: [onlyStrict]
+---*/
+
+assert.throws(ReferenceError, function() {
+ b = 11;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-3-a-2gs-strict.js b/js/src/tests/test262/language/types/reference/8.7.2-3-a-2gs-strict.js
new file mode 100644
index 0000000000..2a47c30665
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-3-a-2gs-strict.js
@@ -0,0 +1,18 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-3-a-2gs
+description: >
+ Strict Mode - 'runtime' error is thrown before LeftHandSide
+ evaluates to an unresolvable Reference
+flags: [onlyStrict]
+---*/
+
+assert.throws(Test262Error, function() {
+ throw new Test262Error();
+ b = 11;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-3-s-strict.js b/js/src/tests/test262/language/types/reference/8.7.2-3-s-strict.js
new file mode 100644
index 0000000000..600c8ca8e5
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-3-s-strict.js
@@ -0,0 +1,21 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-3-s
+description: >
+ Strict Mode - TypeError is thrown if LeftHandSide is a reference
+ to a non-writable data property
+flags: [onlyStrict]
+---*/
+
+ var _8_7_2_3 = {};
+ Object.defineProperty(_8_7_2_3, "b", {
+ writable: false
+ });
+assert.throws(TypeError, function() {
+ _8_7_2_3.b = 11;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-4-s-strict.js b/js/src/tests/test262/language/types/reference/8.7.2-4-s-strict.js
new file mode 100644
index 0000000000..391146cf0b
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-4-s-strict.js
@@ -0,0 +1,22 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-4-s
+description: >
+ Strict Mode - TypeError is thrown if LeftHandSide is a reference
+ to an accessor property with no setter
+flags: [onlyStrict]
+---*/
+
+ var _8_7_2_4 = {};
+ var _8_7_2_4_bValue = 1;
+ Object.defineProperty(_8_7_2_4, "b", {
+ get: function () { return _8_7_2_4_bValue; }
+ });
+assert.throws(TypeError, function() {
+ _8_7_2_4.b = 11;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-5-s-strict.js b/js/src/tests/test262/language/types/reference/8.7.2-5-s-strict.js
new file mode 100644
index 0000000000..4345f82704
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-5-s-strict.js
@@ -0,0 +1,19 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-5-s
+description: >
+ Strict Mode - TypeError is thrown if LeftHandSide is a reference
+ to a non-existent property of an non-extensible object
+flags: [onlyStrict]
+---*/
+
+ var _8_7_2_5 = {};
+ Object.preventExtensions(_8_7_2_5);
+assert.throws(TypeError, function() {
+ _8_7_2_5.b = 11;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-6-s.js b/js/src/tests/test262/language/types/reference/8.7.2-6-s.js
new file mode 100644
index 0000000000..83d556a13d
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-6-s.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-6-s
+description: >
+ TypeError isn't thrown if LeftHandSide is a reference to a writable data
+ property
+---*/
+
+ var _8_7_2_6 = {};
+ Object.defineProperty(_8_7_2_6, "b", {
+ writable: true
+ });
+
+ _8_7_2_6.b = 11;
+
+assert.sameValue(_8_7_2_6.b, 11, '_8_7_2_6.b');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-7-s.js b/js/src/tests/test262/language/types/reference/8.7.2-7-s.js
new file mode 100644
index 0000000000..ffc16ca89b
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-7-s.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-7-s
+description: >
+ TypeError isn't thrown if LeftHandSide is a reference to an accessor
+ property with setter
+---*/
+
+ var _8_7_2_7 = {};
+ var _8_7_2_7_bValue = 1;
+ Object.defineProperty(_8_7_2_7, "b", {
+ get: function () { return _8_7_2_7_bValue; },
+ set: function (value) { _8_7_2_7_bValue = value; }
+ });
+
+ _8_7_2_7.b = 11;
+
+assert.sameValue(_8_7_2_7.b, 11, '_8_7_2_7.b');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/8.7.2-8-s.js b/js/src/tests/test262/language/types/reference/8.7.2-8-s.js
new file mode 100644
index 0000000000..a6dd4f357d
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/8.7.2-8-s.js
@@ -0,0 +1,17 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.7.2-8-s
+description: >
+ TypeError isn't thrown if LeftHandSide is a reference to a property of an
+ extensible object
+---*/
+
+ var _8_7_2_8 = {};
+
+ _8_7_2_8.b = 11;
+
+assert.sameValue(_8_7_2_8.b, 11, '_8_7_2_8.b');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7.1_A1.js b/js/src/tests/test262/language/types/reference/S8.7.1_A1.js
new file mode 100644
index 0000000000..e921083660
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7.1_A1.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Delete operator deletes pure property, so it returns true to be applyed
+ to this.property
+es5id: 8.7.1_A1
+description: Try to delete this.y, where y is this.y=1
+---*/
+
+this.y = 1;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if((delete this.y) !== true){
+ throw new Test262Error('#1: this.y = 1; (delete this.y) === true. Actual: ' + ((delete this.y)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (this.y !== undefined){
+ throw new Test262Error('#2: this.y = 1; (delete this.y) === true; this.y === undefined. Actual: ' + (this.y));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7.1_A2.js b/js/src/tests/test262/language/types/reference/S8.7.1_A2.js
new file mode 100644
index 0000000000..caa0053891
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7.1_A2.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Delete operator can't delete reference, so it returns false to be applyed
+ to reference
+es5id: 8.7.1_A2
+description: Try to delete y, where y is var y=1
+flags: [noStrict]
+---*/
+
+var y = 1;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var result = delete y;
+if(result){
+ throw new Test262Error('#1: y = 1; (delete y) === false. Actual: ' + result);
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (y !== 1) {
+ throw new Test262Error('#2: y = 1; delete y; y === 1. Actual: ' + (y));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7.2_A1_T1.js b/js/src/tests/test262/language/types/reference/S8.7.2_A1_T1.js
new file mode 100644
index 0000000000..a18e421c30
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7.2_A1_T1.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: GetValue(V) mast fail
+es5id: 8.7.2_A1_T1
+description: Checking if execution of "'litera'=1;" fails
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+'litera'=1;
diff --git a/js/src/tests/test262/language/types/reference/S8.7.2_A1_T2.js b/js/src/tests/test262/language/types/reference/S8.7.2_A1_T2.js
new file mode 100644
index 0000000000..2256edac7d
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7.2_A1_T2.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: GetValue(V) mast fail
+es5id: 8.7.2_A1_T2
+description: Checking if execution of "1=1" fails
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+1=1;
diff --git a/js/src/tests/test262/language/types/reference/S8.7.2_A2.js b/js/src/tests/test262/language/types/reference/S8.7.2_A2.js
new file mode 100644
index 0000000000..c3c1714e83
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7.2_A2.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ x++ calls GetValue then PutValue so after applying postfix increment(actually conrete operator type is unimportant)
+ we must have reference to defined value
+es5id: 8.7.2_A2
+description: Execute x++, where x is var x
+---*/
+
+var x;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (x !== undefined) {
+ throw new Test262Error('#1: var x; x === undefined. Actual: ' + (x));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+x++;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (x === undefined) {
+ throw new Test262Error('#2: var x; x++; x !== undefined');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7.2_A3.js b/js/src/tests/test262/language/types/reference/S8.7.2_A3.js
new file mode 100644
index 0000000000..c513dcc818
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7.2_A3.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ this.x++ calls GetValue then PutValue so after applying postfix increment(actually conrete operator type is unimportan)
+ we must have reference to defined value
+es5id: 8.7.2_A3
+description: Execute this.x++, where this.x is undefined
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (this.x !== undefined) {
+ throw new Test262Error('#1: this.x === undefined. Actual: ' + (this.x));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+this.x++;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (x === undefined) {
+ throw new Test262Error('#2: this.x; this.x++; x !== undefined');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7_A1.js b/js/src/tests/test262/language/types/reference/S8.7_A1.js
new file mode 100644
index 0000000000..70a4c24586
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7_A1.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Multiple Variables should Referring to a Single Object
+es5id: 8.7_A1
+description: >
+ Create object and refers to the other object, modify a property in
+ the original object. We now see that that change is represented
+ in both variables
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+// Set obj to an empty object
+//
+var obj = new Object();
+// objRef now refers to the other object
+//
+var objRef = obj;
+// Modify a property in the original object
+objRef.oneProperty = -1;
+obj.oneProperty = true;
+// We now see that that change is represented in both variables
+// (Since they both refer to the same object)
+if(objRef.oneProperty !== true){
+ throw new Test262Error('#1: var obj = new Object(); var objRef = obj; objRef.oneProperty = -1; obj.oneProperty = true; objRef.oneProperty === true. Actual: ' + (objRef.oneProperty));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7_A2.js b/js/src/tests/test262/language/types/reference/S8.7_A2.js
new file mode 100644
index 0000000000..a22951e440
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7_A2.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Reference to Self-Modifying Object remain the integrity
+es5id: 8.7_A2
+description: Create a reference to the array, and change original array
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+// Create an array of items
+var items = new Array( "one", "two", "three" );
+// Create a reference to the array of items
+var itemsRef = items;
+// Add an item to the original array
+items.push( "four" );var itemsRef = items;
+// The length of each array should be the same,
+// since they both point to the same array object
+if( itemsRef.length !== 4){
+ throw new Test262Error('#1: var items = new Array( "one", "two", "three" ); var itemsRef = items; items.push( "four" );var itemsRef = items; itemsRef.length !== 4');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+// Create an array of items
+var items = new Array( "one", "two", "three" );
+// Create a reference to the array of items
+var itemsRef = items;
+// Add an item to the original array
+items[1]="duo";
+// The length of each array should be the same,
+// since they both point to the same array object
+if( itemsRef[1] !== "duo"){
+ throw new Test262Error('#2: var items = new Array( "one", "two", "three" ); var itemsRef = items; items[1]="duo"; itemsRef[1] === "duo". Actual: ' + (itemsRef[1]));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7_A3.js b/js/src/tests/test262/language/types/reference/S8.7_A3.js
new file mode 100644
index 0000000000..989d4ef545
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7_A3.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Changing the Reference of an Object While Maintaining Integrity
+es5id: 8.7_A3
+description: >
+ Create a reference to the array, and redefine original array with
+ new array
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+// Set items to an array (object) of strings
+var items = new Array( "one", "two", "three" );
+// Set itemsRef to a reference to items
+//
+var itemsRef = items;
+// Set items to equal a new object
+//
+items = new Array( "new", "array" );
+// items and itemsRef now point to different objects.
+// items points to new Array( "new", "array" )
+// itemsRef points to new Array( "one", "two", "three" )
+if( items == itemsRef ){
+ throw new Test262Error('#1: var items = new Array( "one", "two", "three" ); var itemsRef = items; items = new Array( "new", "array" ); items != itemsRef');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7_A4.js b/js/src/tests/test262/language/types/reference/S8.7_A4.js
new file mode 100644
index 0000000000..a63097b949
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7_A4.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Object Modification Resulting in a New Object for Not a Self-Modified
+ Object leads to loss of integrity
+es5id: 8.7_A4
+description: >
+ Create a reference to the string, and Concatenate some new text
+ onto the string object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+// Set item equal to a new string object
+var item = new String("test");
+// itemRef now refers to the same string object
+var itemRef = item;
+// Concatenate some new text onto the string object
+// NOTE: This creates a new object, and does not modify
+// the original object.
+item += "ing";
+// The values of item and itemRef are NOT equal, as a whole
+// new string object has been created
+if( item == itemRef ){
+ throw new Test262Error('#1: var item = new String("test"); var itemRef = item; item += "ing"; item != itemRef');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7_A5_T1.js b/js/src/tests/test262/language/types/reference/S8.7_A5_T1.js
new file mode 100644
index 0000000000..b0a12ec30e
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7_A5_T1.js
@@ -0,0 +1,54 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Delete unary operator can't delete object to be referenced
+es5id: 8.7_A5_T1
+description: Delete referenced object, var __ref = obj
+flags: [noStrict]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof(__ref) !== "undefined"){
+ throw new Test262Error('#1: typeof(__ref) === "undefined". Actual: ' + (typeof(__ref)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var obj = new Object();
+var __ref = obj;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (typeof(__ref) === "undefined"){
+ throw new Test262Error('#2: obj = new Object(); var __ref = obj; typeof(__ref) !== "undefined"');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (delete __ref !== false){
+ throw new Test262Error('#3: obj = new Object(); var __ref = obj; delete __ref === false. Actual: ' + (delete __ref));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (typeof(__ref) !== "object"){
+ throw new Test262Error('#4: obj = new Object(); var __ref = obj; delete __ref; typeof(__ref) === "object". Actual: ' + (typeof(__ref)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (typeof(obj) !== "object"){
+ throw new Test262Error('#5: obj = new Object(); var __ref = obj; delete __ref; typeof(obj) === "object". Actual: ' + (typeof(obj)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7_A5_T2.js b/js/src/tests/test262/language/types/reference/S8.7_A5_T2.js
new file mode 100644
index 0000000000..382a3b8e25
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7_A5_T2.js
@@ -0,0 +1,54 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Delete unary operator can't delete object to be referenced
+es5id: 8.7_A5_T2
+description: Delete referenced object, __ref = obj
+flags: [noStrict]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof(__ref) !== "undefined"){
+ throw new Test262Error('#1: typeof(__ref) === "undefined". Actual: ' + (typeof(__ref)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var obj = new Object();
+__ref = obj;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (typeof(__ref) === "undefined"){
+ throw new Test262Error('#2: obj = new Object(); __ref = obj; typeof(__ref) !== "undefined"');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (delete __ref !== true){
+ throw new Test262Error('#3: obj = new Object(); __ref = obj; delete __ref === true. Actual: ' + (delete __ref));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (typeof(__ref) !== "undefined"){
+ throw new Test262Error('#4: obj = new Object(); __ref = obj; delete __ref; typeof(__ref) === "undefined". Actual: ' + (typeof(__ref)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (typeof(obj) !== "object"){
+ throw new Test262Error('#5: obj = new Object(); __ref = obj; delete __ref; typeof(obj) === "object". Actual: ' + (typeof(obj)));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7_A6.js b/js/src/tests/test262/language/types/reference/S8.7_A6.js
new file mode 100644
index 0000000000..d866f9bbd3
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7_A6.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Passing arguments by value differs from by reference and do not change
+ values to be passed
+es5id: 8.7_A6
+description: Adding original variable with referenced one inside function
+---*/
+
+var n = 1;
+var m = n;
+
+function addFirst2Second(first, second){first += second;}
+
+addFirst2Second(n, m);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (m !== 1) {
+ throw new Test262Error('#1: var n = 1; var m = n; function addFirst2Second(first, second){first += second;} addFirst2Second(n, m); m === 1. Actual: ' + (m));
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/S8.7_A7.js b/js/src/tests/test262/language/types/reference/S8.7_A7.js
new file mode 100644
index 0000000000..87895d39df
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/S8.7_A7.js
@@ -0,0 +1,34 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Passing arguments by reference do change values of reference to be passed
+es5id: 8.7_A7
+description: Add new property to original variable inside function
+---*/
+
+var n = {};
+var m = n;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof m !== "object") {
+ throw new Test262Error('#1: var n = {}; var m = n; typeof m === "object". Actual: ' + (typeof m));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function populateAge(person){person.age = 50;}
+
+populateAge(m);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (n.age !== 50) {
+ throw new Test262Error('#2: var n = {}; var m = n; function populateAge(person){person.age = 50;} populateAge(m); n.age === 50. Actual: ' + (n.age));
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/browser.js b/js/src/tests/test262/language/types/reference/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/browser.js
diff --git a/js/src/tests/test262/language/types/reference/get-value-prop-base-primitive-realm.js b/js/src/tests/test262/language/types/reference/get-value-prop-base-primitive-realm.js
new file mode 100644
index 0000000000..a0720572d1
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/get-value-prop-base-primitive-realm.js
@@ -0,0 +1,38 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-getvalue
+es6id: 6.2.3.1
+description: >
+ When the base of a property reference is primitive, it is coerced to an
+ object during value retrieval (honoring the realm of the current execution
+ context)
+info: |
+ [...]
+ 5. If IsPropertyReference(V) is true, then
+ a. If HasPrimitiveBase(V) is true, then
+ i. Assert: In this case, base will never be null or undefined.
+ ii. Let base be ToObject(base).
+ b. Return ? base.[[Get]](GetReferencedName(V), GetThisValue(V)).
+features: [cross-realm, Symbol]
+---*/
+
+var other = $262.createRealm().global;
+
+other.Number.prototype.test262 = 'number prototype';
+other.value = 1;
+assert.sameValue(other.eval('value.test262'), 'number prototype');
+
+other.String.prototype.test262 = 'string prototype';
+other.value = '';
+assert.sameValue(other.eval('value.test262'), 'string prototype');
+
+other.Boolean.prototype.test262 = 'Boolean prototype';
+other.value = true;
+assert.sameValue(other.eval('value.test262'), 'Boolean prototype');
+
+other.Symbol.prototype.test262 = 'Symbol prototype';
+other.value = Symbol();
+assert.sameValue(other.eval('value.test262'), 'Symbol prototype');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/get-value-prop-base-primitive.js b/js/src/tests/test262/language/types/reference/get-value-prop-base-primitive.js
new file mode 100644
index 0000000000..fba94808b3
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/get-value-prop-base-primitive.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-getvalue
+es6id: 6.2.3.1
+description: >
+ When the base of a property reference is primitive, it is coerced to an
+ object during value retrieval
+info: |
+ [...]
+ 5. If IsPropertyReference(V) is true, then
+ a. If HasPrimitiveBase(V) is true, then
+ i. Assert: In this case, base will never be null or undefined.
+ ii. Let base be ToObject(base).
+ b. Return ? base.[[Get]](GetReferencedName(V), GetThisValue(V)).
+features: [Symbol]
+---*/
+
+Number.prototype.test262 = 'number prototype';
+assert.sameValue(1..test262, 'number prototype');
+
+String.prototype.test262 = 'string prototype';
+assert.sameValue(''.test262, 'string prototype');
+
+Boolean.prototype.test262 = 'Boolean prototype';
+assert.sameValue(true.test262, 'Boolean prototype');
+
+Symbol.prototype.test262 = 'Symbol prototype';
+assert.sameValue(Symbol().test262, 'Symbol prototype');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/put-value-prop-base-primitive-realm.js b/js/src/tests/test262/language/types/reference/put-value-prop-base-primitive-realm.js
new file mode 100644
index 0000000000..77f2787c70
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/put-value-prop-base-primitive-realm.js
@@ -0,0 +1,51 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-putvalue
+es6id: 6.2.3.2
+description: >
+ When the base of a property reference is primitive, it is coerced to an
+ object during value assignment (honoring the realm of the current execution
+ context)
+info: |
+ [...]
+ 6. Else if IsPropertyReference(V) is true, then
+ a. If HasPrimitiveBase(V) is true, then
+ i. Assert: In this case, base will never be null or undefined.
+ ii. Set base to ToObject(base).
+ b. Let succeeded be ? base.[[Set]](GetReferencedName(V), W,
+ GetThisValue(V)).
+ c. If succeeded is false and IsStrictReference(V) is true, throw a
+ TypeError exception.
+ d. Return.
+features: [cross-realm, Symbol, Proxy]
+---*/
+
+var other = $262.createRealm().global;
+var numberCount = 0;
+var stringCount = 0;
+var booleanCount = 0;
+var symbolCount = 0;
+var spy;
+
+spy = new Proxy({}, { set: function() { numberCount += 1; return true; } });
+Object.setPrototypeOf(other.Number.prototype, spy);
+other.eval('0..test262 = null;');
+assert.sameValue(numberCount, 1, 'number');
+
+spy = new Proxy({}, { set: function() { stringCount += 1; return true; } });
+Object.setPrototypeOf(other.String.prototype, spy);
+other.eval('"".test262 = null;');
+assert.sameValue(stringCount, 1, 'string');
+
+spy = new Proxy({}, { set: function() { booleanCount += 1; return true; } });
+Object.setPrototypeOf(other.Boolean.prototype, spy);
+other.eval('true.test262 = null;');
+assert.sameValue(booleanCount, 1, 'string');
+
+spy = new Proxy({}, { set: function() { symbolCount += 1; return true; } });
+Object.setPrototypeOf(other.Symbol.prototype, spy);
+other.eval('Symbol().test262 = null;');
+assert.sameValue(symbolCount, 1, 'string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/put-value-prop-base-primitive.js b/js/src/tests/test262/language/types/reference/put-value-prop-base-primitive.js
new file mode 100644
index 0000000000..b7856f0d05
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/put-value-prop-base-primitive.js
@@ -0,0 +1,49 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-putvalue
+es6id: 6.2.3.2
+description: >
+ When the base of a property reference is primitive, it is coerced to an
+ object during value assignment
+info: |
+ [...]
+ 6. Else if IsPropertyReference(V) is true, then
+ a. If HasPrimitiveBase(V) is true, then
+ i. Assert: In this case, base will never be null or undefined.
+ ii. Set base to ToObject(base).
+ b. Let succeeded be ? base.[[Set]](GetReferencedName(V), W,
+ GetThisValue(V)).
+ c. If succeeded is false and IsStrictReference(V) is true, throw a
+ TypeError exception.
+ d. Return.
+features: [Symbol, Proxy]
+---*/
+
+var numberCount = 0;
+var stringCount = 0;
+var booleanCount = 0;
+var symbolCount = 0;
+var spy;
+
+spy = new Proxy({}, { set: function() { numberCount += 1; return true; } });
+Object.setPrototypeOf(Number.prototype, spy);
+0..test262 = null;
+assert.sameValue(numberCount, 1, 'number');
+
+spy = new Proxy({}, { set: function() { stringCount += 1; return true; } });
+Object.setPrototypeOf(String.prototype, spy);
+''.test262 = null;
+assert.sameValue(stringCount, 1, 'string');
+
+spy = new Proxy({}, { set: function() { booleanCount += 1; return true; } });
+Object.setPrototypeOf(Boolean.prototype, spy);
+true.test262 = null;
+assert.sameValue(booleanCount, 1, 'string');
+
+spy = new Proxy({}, { set: function() { symbolCount += 1; return true; } });
+Object.setPrototypeOf(Symbol.prototype, spy);
+Symbol().test262 = null;
+assert.sameValue(symbolCount, 1, 'string');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/reference/shell.js b/js/src/tests/test262/language/types/reference/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/reference/shell.js
diff --git a/js/src/tests/test262/language/types/shell.js b/js/src/tests/test262/language/types/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/shell.js
diff --git a/js/src/tests/test262/language/types/string/S8.4_A1.js b/js/src/tests/test262/language/types/string/S8.4_A1.js
new file mode 100644
index 0000000000..6f3fa1c886
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A1.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Any variable that has been assigned with string literal has the type
+ string
+es5id: 8.4_A1
+description: Check type of variable that has been assigned with string literal
+---*/
+
+/////////////////////////////////////////////////////////
+// CHECK#1
+var str="abcdfg";
+if (typeof(str)!=="string"){
+ throw new Test262Error('#1: var str="abcdfg"; typeof(str) === "string". Actual: ' + (typeof(str)));
+}
+//
+////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////
+// CHECK#2
+var str2='qwerty';
+if (typeof(str2)!=="string"){
+ throw new Test262Error('#2: var str2=\'qwerty\'; typeof(str) === "string". Actual: ' + (typeof(str2)));
+}
+//
+////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////
+// CHECK#3
+var __str='\u0042\u0043\u0044\u0045\u0046\u0047\u0048';
+if (typeof(__str)!=="string"){
+ throw new Test262Error('#3: var __str=\'\\u0042\\u0043\\u0044\\u0045\\u0046\\u0047\\u0048\'; typeof(__str) === "string". Actual: ' + (typeof(__str)));
+}
+//
+////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////
+// CHECK#4
+var str__="\u0042\u0043\u0044\u0045\u0046\u0047\u0048";
+if (typeof(str__)!=="string"){
+ throw new Test262Error('#4: var str__="abcdfg"; typeof(str__) === "string". Actual: ' + (typeof(str__)));
+}
+//
+////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A10.js b/js/src/tests/test262/language/types/string/S8.4_A10.js
new file mode 100644
index 0000000000..7bf4ee3d2f
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A10.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Both unicode and ascii chars are allowed
+es5id: 8.4_A10
+description: Create string using both unicode and ascii chars
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var __str = "\u0041A\u0042B\u0043C";
+if (__str !== 'AABBCC'){
+ throw new Test262Error('#1: var __str = "\\u0041A\\u0042B\\u0043C"; __str === \'AABBCC\'. Actual: ' + (__str));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+var __str__ = "\u0041\u0042\u0043"+'ABC';
+if (__str__ !== 'ABCABC'){
+ throw new Test262Error('#2: var __str__ = "\\u0041\\u0042\\u0043"+\'ABC\'; __str__ === \'ABCABC\'. Actual: ' + (__str__));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+var str__ = "ABC"+'\u0041\u0042\u0043';
+if (str__ !== "ABCABC"){
+ throw new Test262Error('#2: var str__ = "ABC"+\'\\u0041\\u0042\\u0043\'; str__ === "ABCABC". Actual: ' + (str__));
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A11.js b/js/src/tests/test262/language/types/string/S8.4_A11.js
new file mode 100644
index 0000000000..91f8534b17
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A11.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.
+
+/*---
+info: Presence of reserved words in string literal are allowed
+es5id: 8.4_A11
+description: Create string variable, thet include all reserved words
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var __delete=" break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof ";
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A12.js b/js/src/tests/test262/language/types/string/S8.4_A12.js
new file mode 100644
index 0000000000..75b0be90e7
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A12.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment to string literal calls String constructor
+es5id: 8.4_A12
+description: Check constructor of simple assigned variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var str = "rock'n'roll";
+if (str.constructor !== String){
+ throw new Test262Error('#1: var str = "rock\'n\'roll"; str.constructor === String. Actual: ' + (str.constructor));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A13_T1.js b/js/src/tests/test262/language/types/string/S8.4_A13_T1.js
new file mode 100644
index 0000000000..c266540014
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A13_T1.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When appears not closed single-quote program failes
+es5id: 8.4_A13_T1
+description: Try to create variable using 3 single-quote
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var str = ''';
diff --git a/js/src/tests/test262/language/types/string/S8.4_A13_T2.js b/js/src/tests/test262/language/types/string/S8.4_A13_T2.js
new file mode 100644
index 0000000000..642d1f2e55
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A13_T2.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When appears not closed single-quote program failes
+es5id: 8.4_A13_T2
+description: Try to create variable using 1 single-quote
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var str = ';
diff --git a/js/src/tests/test262/language/types/string/S8.4_A13_T3.js b/js/src/tests/test262/language/types/string/S8.4_A13_T3.js
new file mode 100644
index 0000000000..1f74d8829e
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A13_T3.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When appears not closed single-quote program failes
+es5id: 8.4_A13_T3
+description: Try to create variable using 4 single-quote
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var str = '''';
diff --git a/js/src/tests/test262/language/types/string/S8.4_A14_T1.js b/js/src/tests/test262/language/types/string/S8.4_A14_T1.js
new file mode 100644
index 0000000000..bdeb96d44f
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A14_T1.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When appears not closed double-quote program failes
+es5id: 8.4_A14_T1
+description: Try to create variable using 1 double-quote
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var str = ";
diff --git a/js/src/tests/test262/language/types/string/S8.4_A14_T2.js b/js/src/tests/test262/language/types/string/S8.4_A14_T2.js
new file mode 100644
index 0000000000..7d7bbb2833
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A14_T2.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When appears not closed double-quote program failes
+es5id: 8.4_A14_T2
+description: Try to create variable using 3 double-quote
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var str = """;
diff --git a/js/src/tests/test262/language/types/string/S8.4_A14_T3.js b/js/src/tests/test262/language/types/string/S8.4_A14_T3.js
new file mode 100644
index 0000000000..637978749b
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A14_T3.js
@@ -0,0 +1,16 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When appears not closed double-quote program failes
+es5id: 8.4_A14_T3
+description: Try to create variable using 4 double-quote
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var str = """";
diff --git a/js/src/tests/test262/language/types/string/S8.4_A2.js b/js/src/tests/test262/language/types/string/S8.4_A2.js
new file mode 100644
index 0000000000..3fb35dd7e8
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A2.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Empty string has type string
+es5id: 8.4_A2
+description: Create empty string and check it type
+---*/
+
+/////////////////////////////////////////////////////////
+// CHECK#1
+var str = '';
+if (typeof(str) !== 'string'){
+ throw new Test262Error('#1: var str = \'\'; typeof(str) === \'string\'. Actual: ' + (typeof(str)));
+}
+//
+////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////
+// CHECK#2
+var str = "";
+if (typeof(str) !== "string"){
+ throw new Test262Error('#2: var str = ""; typeof(str) === "string". Actual: ' + (str));
+}
+//
+////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A3.js b/js/src/tests/test262/language/types/string/S8.4_A3.js
new file mode 100644
index 0000000000..e9af287a22
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A3.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String type has a length property
+es5id: 8.4_A3
+description: Try read length property of string variable
+---*/
+
+var __str = "ABCDEFGH";
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.length !== 8) {
+ throw new Test262Error('#1: var __str = "ABCDEFGH"; __str.length === 8. Actual: ' + (__str.length));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A4.js b/js/src/tests/test262/language/types/string/S8.4_A4.js
new file mode 100644
index 0000000000..3d9e85a9ee
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A4.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Empty string variable has a length property
+es5id: 8.4_A4
+description: Try read length property of empty string variable
+---*/
+
+var __str = "";
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.length !== 0) {
+ throw new Test262Error('#1: var __str = ""; __str.length === 0. Actual: ' + (__str));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A5.js b/js/src/tests/test262/language/types/string/S8.4_A5.js
new file mode 100644
index 0000000000..40fb09c62a
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A5.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Zero "\0" not terminates the string(C string)
+es5id: 8.4_A5
+description: Insert "\0" into string
+---*/
+
+// CHECK#1
+if ("x\0y" === "x") {
+ throw new Test262Error('#1: "x\\0y" !== "x"');
+}
+
+// CHECK#2
+if (!(("x\0a" < "x\0b") && ("x\0b" < "x\0c"))) {
+ throw new Test262Error('#2: (("x\\0a" < "x\\0b") && ("x\\0b" < "x\\0c")) === true');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A6.1.js b/js/src/tests/test262/language/types/string/S8.4_A6.1.js
new file mode 100644
index 0000000000..8453a751bf
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A6.1.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Large string 4096 bytes
+es5id: 8.4_A6.1
+description: Assign variable by large string
+---*/
+
+////////////////////////////////////////////////////
+// Check#1
+var largeStr='Standard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chECMAScript LanguageSpecificationStandard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chMB Ecma-262.doc 08-04-02 16,53ECMAScript LanguageSpecificationBrief HistoryThis ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape)and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in thatcompan Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers fromMicrosoft starting with Internet Explorer 3.0.The development of this Standard started in November 1996. The first edition of this ECMA Standard was adopted bythe ECMA General Assembly of June 1997.That ECMA Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved asinternational standard ISO/IEC 16262, in April 1998. The ECMA General Assembly of June 1998 approved thesecond edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the secondedition are editorial in nature.The current document defines the third edition of the Standard and includes powerful regular expressions, betterstring handling, new control statements, try/catch exception handling, tighter definition of errors, formatting fornumeric output and minor changes in anticipation of forthcoming internationalisation facilities and future languagegrowth.Work on the language is not complete. The technical committee is working on significant enhancements, includingmechanisms for scripts to be created and used across the Internet, and tighter coordination with other standards bodiessuch as groups within the World Wide Web Consortium and the Wireless Application Protocol Forum.This Standard has been adopted as 3rd Edition of ECMA-262 by the ECMA General Assembly in December, 1999.- i -Table of contents1 Scope 12 Conformance 13 References 14 Overview 1 4.1 Web Scripting 2 4.2 Language Overview 2 4.2.1 Objects 3 4.3 Definitions 4 4.3.1 Type 4 4.3.2 Primitive Value 4 4.3.3 Object 4 4.3.4 Constructor 4 4.3.5 Prototype 4 4.3.6 Native Object 4 4.3.7 Built-in Object 4 4.3.8 Host Object 4 4.3.9 Undefined Value 4 4.3.10 Undefined Type 4 4.3.11 Null Value 4 4.3.12 Null Type 4 4.3.13 Boolean Value 4 4.3.14 Boolean Type 4 4.3.15 Boolean Object 5 4.3.16 String Value 5 4.3.17 String Type 5 4.3.18 String Object 5 4.3.19 Number Value 5 4.3.20 Number Type 5 4.3.21 Number Object 5 4.3.22 Infinity 5 4.3.23 NaN 5 5 Notational Conventions 6 5.1 Syntactic and Lexical Grammars 6 5.1.1 Context-Free Grammars 6 5.1.2 The Lexical and RegExp Grammars 6 5.1.3 The Numeric String Grammar 6 5.1.4 The Syntactic Grammar 6 5.1.5 Grammar Notation 7 5.2 Algorithm Conventions 9 6. Source Text 10 7 Lexical Conventions 11 7.1 Unicode Format-Control Characters 11 7.2 White Space 11 7.3 Line Terminators 12 7.4 Comments 12 - ii - 7.5 Tokens 13 7.5.1 Reserved Words 13 7.5.2 Keywords 13 7.5.3 Future Reserved Words 14 7.6 Identifiers 14 7.7 Punctuators 15 7.8 Literals 16 7.8.1 Null Literals 16 7.8.2 Boolean Literals 16 7.8.3 Numeric Literals 16 7.8.4 String Literals 18 7.8.5 Regular Expression Literals 20 7.9 Automatic Semicolon Insertion 21 7.9.1 Rules of Automatic Semicolon Insertion 21 7.9.2 Examples of Automatic Semicolon Insertion 22 8 Types 24 8.1 The Undefined Type 24 8.2 The Null Type 24 8.3 The Boolean Type 24 8.4 The String Type 24 8.5 The Number Type 24 8.6 The Object Type 25 8.6.1 Property Attributes 25 8.6.2 Internal Properties and Methods 26 8.7 The Reference Type 29 8.7.1 GetValue (V) 29 8.7.2 PutValue (V, W) 29 8.8 The List Type 30 8.9 The Completion Type 30 9 Type Conversion 30 9.1 ToPrimitive 30 9.2 ToBoolean 30 9.3 ToNumber 31 9.3.1 ToNumber Ap';
+if(largeStr !== 'Standard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chECMAScript LanguageSpecificationStandard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chMB Ecma-262.doc 08-04-02 16,53ECMAScript LanguageSpecificationBrief HistoryThis ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape)and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in thatcompan Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers fromMicrosoft starting with Internet Explorer 3.0.The development of this Standard started in November 1996. The first edition of this ECMA Standard was adopted bythe ECMA General Assembly of June 1997.That ECMA Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved asinternational standard ISO/IEC 16262, in April 1998. The ECMA General Assembly of June 1998 approved thesecond edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the secondedition are editorial in nature.The current document defines the third edition of the Standard and includes powerful regular expressions, betterstring handling, new control statements, try/catch exception handling, tighter definition of errors, formatting fornumeric output and minor changes in anticipation of forthcoming internationalisation facilities and future languagegrowth.Work on the language is not complete. The technical committee is working on significant enhancements, includingmechanisms for scripts to be created and used across the Internet, and tighter coordination with other standards bodiessuch as groups within the World Wide Web Consortium and the Wireless Application Protocol Forum.This Standard has been adopted as 3rd Edition of ECMA-262 by the ECMA General Assembly in December, 1999.- i -Table of contents1 Scope 12 Conformance 13 References 14 Overview 1 4.1 Web Scripting 2 4.2 Language Overview 2 4.2.1 Objects 3 4.3 Definitions 4 4.3.1 Type 4 4.3.2 Primitive Value 4 4.3.3 Object 4 4.3.4 Constructor 4 4.3.5 Prototype 4 4.3.6 Native Object 4 4.3.7 Built-in Object 4 4.3.8 Host Object 4 4.3.9 Undefined Value 4 4.3.10 Undefined Type 4 4.3.11 Null Value 4 4.3.12 Null Type 4 4.3.13 Boolean Value 4 4.3.14 Boolean Type 4 4.3.15 Boolean Object 5 4.3.16 String Value 5 4.3.17 String Type 5 4.3.18 String Object 5 4.3.19 Number Value 5 4.3.20 Number Type 5 4.3.21 Number Object 5 4.3.22 Infinity 5 4.3.23 NaN 5 5 Notational Conventions 6 5.1 Syntactic and Lexical Grammars 6 5.1.1 Context-Free Grammars 6 5.1.2 The Lexical and RegExp Grammars 6 5.1.3 The Numeric String Grammar 6 5.1.4 The Syntactic Grammar 6 5.1.5 Grammar Notation 7 5.2 Algorithm Conventions 9 6. Source Text 10 7 Lexical Conventions 11 7.1 Unicode Format-Control Characters 11 7.2 White Space 11 7.3 Line Terminators 12 7.4 Comments 12 - ii - 7.5 Tokens 13 7.5.1 Reserved Words 13 7.5.2 Keywords 13 7.5.3 Future Reserved Words 14 7.6 Identifiers 14 7.7 Punctuators 15 7.8 Literals 16 7.8.1 Null Literals 16 7.8.2 Boolean Literals 16 7.8.3 Numeric Literals 16 7.8.4 String Literals 18 7.8.5 Regular Expression Literals 20 7.9 Automatic Semicolon Insertion 21 7.9.1 Rules of Automatic Semicolon Insertion 21 7.9.2 Examples of Automatic Semicolon Insertion 22 8 Types 24 8.1 The Undefined Type 24 8.2 The Null Type 24 8.3 The Boolean Type 24 8.4 The String Type 24 8.5 The Number Type 24 8.6 The Object Type 25 8.6.1 Property Attributes 25 8.6.2 Internal Properties and Methods 26 8.7 The Reference Type 29 8.7.1 GetValue (V) 29 8.7.2 PutValue (V, W) 29 8.8 The List Type 30 8.9 The Completion Type 30 9 Type Conversion 30 9.1 ToPrimitive 30 9.2 ToBoolean 30 9.3 ToNumber 31 9.3.1 ToNumber Ap'){
+ throw new Test262Error('#1: Large string 4096 bytes');
+}
+//
+////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A6.2.js b/js/src/tests/test262/language/types/string/S8.4_A6.2.js
new file mode 100644
index 0000000000..66c9851325
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A6.2.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Large string 8192 bytes
+es5id: 8.4_A6.2
+description: Assign variable by large string
+---*/
+
+////////////////////////////////////////////////////
+// Check#2
+var largeStr='Standard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chECMAScript LanguageSpecificationStandard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chMB Ecma-262.doc 08-04-02 16,53ECMAScript LanguageSpecificationBrief HistoryThis ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape)and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in thatcompans Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers fromMicrosoft starting with Internet Explorer 3.0.The development of this Standard started in November 1996. The first edition of this ECMA Standard was adopted bythe ECMA General Assembly of June 1997.That ECMA Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved asinternational standard ISO/IEC 16262, in April 1998. The ECMA General Assembly of June 1998 approved thesecond edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the secondedition are editorial in nature.The current document defines the third edition of the Standard and includes powerful regular expressions, betterstring handling, new control statements, try/catch exception handling, tighter definition of errors, formatting fornumeric output and minor changes in anticipation of forthcoming internationalisation facilities and future languagegrowth.Work on the language is not complete. The technical committee is working on significant enhancements, includingmechanisms for scripts to be created and used across the Internet, and tighter coordination with other standards bodiessuch as groups within the World Wide Web Consortium and the Wireless Application Protocol Forum.This Standard has been adopted as 3rd Edition of ECMA-262 by the ECMA General Assembly in December, 1999.- i -Table of contents1 Scope 12 Conformance 13 References 14 Overview 1 4.1 Web Scripting 2 4.2 Language Overview 2 4.2.1 Objects 3 4.3 Definitions 4 4.3.1 Type 4 4.3.2 Primitive Value 4 4.3.3 Object 4 4.3.4 Constructor 4 4.3.5 Prototype 4 4.3.6 Native Object 4 4.3.7 Built-in Object 4 4.3.8 Host Object 4 4.3.9 Undefined Value 4 4.3.10 Undefined Type 4 4.3.11 Null Value 4 4.3.12 Null Type 4 4.3.13 Boolean Value 4 4.3.14 Boolean Type 4 4.3.15 Boolean Object 5 4.3.16 String Value 5 4.3.17 String Type 5 4.3.18 String Object 5 4.3.19 Number Value 5 4.3.20 Number Type 5 4.3.21 Number Object 5 4.3.22 Infinity 5 4.3.23 NaN 5 5 Notational Conventions 6 5.1 Syntactic and Lexical Grammars 6 5.1.1 Context-Free Grammars 6 5.1.2 The Lexical and RegExp Grammars 6 5.1.3 The Numeric String Grammar 6 5.1.4 The Syntactic Grammar 6 5.1.5 Grammar Notation 7 5.2 Algorithm Conventions 9 6. Source Text 10 7 Lexical Conventions 11 7.1 Unicode Format-Control Characters 11 7.2 White Space 11 7.3 Line Terminators 12 7.4 Comments 12 - ii - 7.5 Tokens 13 7.5.1 Reserved Words 13 7.5.2 Keywords 13 7.5.3 Future Reserved Words 14 7.6 Identifiers 14 7.7 Punctuators 15 7.8 Literals 16 7.8.1 Null Literals 16 7.8.2 Boolean Literals 16 7.8.3 Numeric Literals 16 7.8.4 String Literals 18 7.8.5 Regular Expression Literals 20 7.9 Automatic Semicolon Insertion 21 7.9.1 Rules of Automatic Semicolon Insertion 21 7.9.2 Examples of Automatic Semicolon Insertion 22 8 Types 24 8.1 The Undefined Type 24 8.2 The Null Type 24 8.3 The Boolean Type 24 8.4 The String Type 24 8.5 The Number Type 24 8.6 The Object Type 25 8.6.1 Property Attributes 25 8.6.2 Internal Properties and Methods 26 8.7 The Reference Type 29 8.7.1 GetValue (V) 29 8.7.2 PutValue (V, W) 29 8.8 The List Type 30 8.9 The Completion Type 30 9 Type Conversion 30 9.1 ToPrimitive 30 9.2 ToBoolean 30 9.3 ToNumber 31 9.3.1 ToNumber Applied to the String Type 31 9.4 ToInteger 34 9.5 ToInt32: (Signed 32 Bit Integer) 34 9.6 ToUint32: (Unsigned 32 Bit Integer) 34 9.7 ToUint16: (Unsigned 16 Bit Integer) 35 9.8 ToString 35 9.8.1 ToString Applied to the Number Type 35 9.9 ToObject 36 10 Execution Contexts 37 10.1 Definitions 37 10.1.1 Function Objects 37 10.1.2 Types of Executable Code 37 10.1.3 Variable Instantiation 37 10.1.4 Scope Chain and Identifier Resolution 38 10.1.5 Global Object 38 10.1.6 Activation Object 38 - i i i - 10.1.7 This 39 10.1.8 Arguments Object 39 10.2 Entering An Execution Context 39 10.2.1 Global Code 39 10.2.2 Eval Code 39 10.2.3 Function Code 39 11 Expressions 40 11.1 Primary Expressions 40 11.1.1 The this Keyword 40 11.1.2 Identifier Reference 40 11.1.3 Literal Reference 40 11.1.4 Array Initialiser 40 11.1.5 Object Initialiser 41 11.1.6 The Grouping Operator 42 11.2 Left-Hand-Side Expressions 43 11.2.1 Property Accessors 43 11.2.2 The new Operator 44 11.2.3 Function Calls 44 11.2.4 Argument Lists 45 11.2.5 Function Expressions 45 11.3 Postfix Expressions 45 11.3.1 Postfix Increment Operator 45 11.3.2 Postfix Decrement Operator 45 11.4 Unary Operators 46 11.4.1 The delete Operator 46 11.4.2 The void Operator 46 11.4.3 The typeof Operator 46 11.4.4 Prefix Increment Operator 47 11.4.5 Prefix Decrement Operator 47 11.4.6 Unary + Operator 47 11.4.7 Unary - Operator 47 11.4.8 Bitwise NOT Operator ( ~) 48 11.4.9 Logical NOT Operator ( !) 48 11.5 Multiplicative Operators 48 11.5.1 Applying the * Operator 48 11.5.2 Applying the / Operator 49 11.5.3 Applying the % Operator 49 11.6 Additive Operators 50 11.6.1 The Addition operator ( +) 50 11.6.2 The Subtraction Operator ( -) 50 11.6.3 Applying the Additive Operators ( +,- ) to Numbers 51 11.7 Bitwise Shift Operators 51 11.7.1 The Left Shift Operator ( <<) 51 11.7.2 The Signed Right Shift Operator ( >>) 51 11.7.3 The Unsigned Right Shift Operator ( >>>) 52 11.4 Relational Operators 52 11.8.1 The Less-than Operator ( <) 53 11.8.2 The Greater-than Operator ( >) 53 11.8.3 The Less-than-or-equal Operator ( <=) 53 11.8.4 The Greater-than-or-equal Operator ( >=) 53 11.8.5 The Abstract Relational Comparison Algorithm 53 - iv - 11.8.6 The instanceof operator 54 11.8.7 The in operator 54 11.9 Equality Operators 54 11.9.1 The Equals Operator ( ==) 55 11.9.2 The Does-not-equals Operator ( !=) 55 11.9.3 The Abstract Equality Comparison Algorithm 55 11.9.4 The Strict Equals Operator ( ===) 56 11.9.5 The Strict Does-not-equal Operator ( !==) 56 11.9.6 The Strict Equality Comparison Algorithm 56 11.10 Binary Bitwise Operators 57 11.11 Binary Logical Operators 58 11.12 Conditional Operator ( ?: ) 58 11.13 Assignment Operators 59 11.13.1 Simple Assignment ( =) 59 11.13.2 Compound Assignment ( op=) 60 11.14 Comma Operator ( , ) 60 12 Statements 61 12.1 Block 61 12.2 Variable statement 62 12.3 Empty Statement 63 12.4 Expression Statement 63 12.5 The if Statement 63 12.6 Iteration Statements 64 12.6.1 The do-while Statement 64 12.6.2 The while statement 64 12.6.3 The for Statement 65 12.6.4 The for-in Statement 65 12.7 The continue Statement 66 12.8 The break Statement 67 12.9 The return Statement 67 12.10 The with Statement 67 12.11 The switch Statement 68 12.12 Labelled Statements 69 12.13 The throw statement 69 12.14 The try statement 70 13 Function Definition 71 13.1 Definitions 72 13.1.1 Equated Grammar Productions 72 13.1.2 Joined Objects 72 13.2 Creating Function Objects 72 13.2.1 [[Call]] 73 13.2.2 [[Construct]] 74 14 Program 75 15 Native ECMAScript Objects 76 15.1 The Global Object 76 15.1.1 Value Properties of the Global Object 77 15.1.2 Function Properties of the Global Object 77 15.1.3 URI Handling Function Properties 78 - v - 15.1.4 Constructor Properties of the Global Object 83 15.1.5 Other Properties of the Global Object 83 15.2 Object Objects 83 15.2.1 The Object Constructor Called as a Function 83 15.2.2 The Object Constructor 84 15.2.3 Properties of the Object Constructor 84 15.2.4 Properties of the Object Prototype Object 84 15.2.5 Properties of Object Instances 85 15.3 Function Objects 85 ';
+if(largeStr !== 'Standard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chECMAScript LanguageSpecificationStandard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chMB Ecma-262.doc 08-04-02 16,53ECMAScript LanguageSpecificationBrief HistoryThis ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape)and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in thatcompans Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers fromMicrosoft starting with Internet Explorer 3.0.The development of this Standard started in November 1996. The first edition of this ECMA Standard was adopted bythe ECMA General Assembly of June 1997.That ECMA Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved asinternational standard ISO/IEC 16262, in April 1998. The ECMA General Assembly of June 1998 approved thesecond edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the secondedition are editorial in nature.The current document defines the third edition of the Standard and includes powerful regular expressions, betterstring handling, new control statements, try/catch exception handling, tighter definition of errors, formatting fornumeric output and minor changes in anticipation of forthcoming internationalisation facilities and future languagegrowth.Work on the language is not complete. The technical committee is working on significant enhancements, includingmechanisms for scripts to be created and used across the Internet, and tighter coordination with other standards bodiessuch as groups within the World Wide Web Consortium and the Wireless Application Protocol Forum.This Standard has been adopted as 3rd Edition of ECMA-262 by the ECMA General Assembly in December, 1999.- i -Table of contents1 Scope 12 Conformance 13 References 14 Overview 1 4.1 Web Scripting 2 4.2 Language Overview 2 4.2.1 Objects 3 4.3 Definitions 4 4.3.1 Type 4 4.3.2 Primitive Value 4 4.3.3 Object 4 4.3.4 Constructor 4 4.3.5 Prototype 4 4.3.6 Native Object 4 4.3.7 Built-in Object 4 4.3.8 Host Object 4 4.3.9 Undefined Value 4 4.3.10 Undefined Type 4 4.3.11 Null Value 4 4.3.12 Null Type 4 4.3.13 Boolean Value 4 4.3.14 Boolean Type 4 4.3.15 Boolean Object 5 4.3.16 String Value 5 4.3.17 String Type 5 4.3.18 String Object 5 4.3.19 Number Value 5 4.3.20 Number Type 5 4.3.21 Number Object 5 4.3.22 Infinity 5 4.3.23 NaN 5 5 Notational Conventions 6 5.1 Syntactic and Lexical Grammars 6 5.1.1 Context-Free Grammars 6 5.1.2 The Lexical and RegExp Grammars 6 5.1.3 The Numeric String Grammar 6 5.1.4 The Syntactic Grammar 6 5.1.5 Grammar Notation 7 5.2 Algorithm Conventions 9 6. Source Text 10 7 Lexical Conventions 11 7.1 Unicode Format-Control Characters 11 7.2 White Space 11 7.3 Line Terminators 12 7.4 Comments 12 - ii - 7.5 Tokens 13 7.5.1 Reserved Words 13 7.5.2 Keywords 13 7.5.3 Future Reserved Words 14 7.6 Identifiers 14 7.7 Punctuators 15 7.8 Literals 16 7.8.1 Null Literals 16 7.8.2 Boolean Literals 16 7.8.3 Numeric Literals 16 7.8.4 String Literals 18 7.8.5 Regular Expression Literals 20 7.9 Automatic Semicolon Insertion 21 7.9.1 Rules of Automatic Semicolon Insertion 21 7.9.2 Examples of Automatic Semicolon Insertion 22 8 Types 24 8.1 The Undefined Type 24 8.2 The Null Type 24 8.3 The Boolean Type 24 8.4 The String Type 24 8.5 The Number Type 24 8.6 The Object Type 25 8.6.1 Property Attributes 25 8.6.2 Internal Properties and Methods 26 8.7 The Reference Type 29 8.7.1 GetValue (V) 29 8.7.2 PutValue (V, W) 29 8.8 The List Type 30 8.9 The Completion Type 30 9 Type Conversion 30 9.1 ToPrimitive 30 9.2 ToBoolean 30 9.3 ToNumber 31 9.3.1 ToNumber Applied to the String Type 31 9.4 ToInteger 34 9.5 ToInt32: (Signed 32 Bit Integer) 34 9.6 ToUint32: (Unsigned 32 Bit Integer) 34 9.7 ToUint16: (Unsigned 16 Bit Integer) 35 9.8 ToString 35 9.8.1 ToString Applied to the Number Type 35 9.9 ToObject 36 10 Execution Contexts 37 10.1 Definitions 37 10.1.1 Function Objects 37 10.1.2 Types of Executable Code 37 10.1.3 Variable Instantiation 37 10.1.4 Scope Chain and Identifier Resolution 38 10.1.5 Global Object 38 10.1.6 Activation Object 38 - i i i - 10.1.7 This 39 10.1.8 Arguments Object 39 10.2 Entering An Execution Context 39 10.2.1 Global Code 39 10.2.2 Eval Code 39 10.2.3 Function Code 39 11 Expressions 40 11.1 Primary Expressions 40 11.1.1 The this Keyword 40 11.1.2 Identifier Reference 40 11.1.3 Literal Reference 40 11.1.4 Array Initialiser 40 11.1.5 Object Initialiser 41 11.1.6 The Grouping Operator 42 11.2 Left-Hand-Side Expressions 43 11.2.1 Property Accessors 43 11.2.2 The new Operator 44 11.2.3 Function Calls 44 11.2.4 Argument Lists 45 11.2.5 Function Expressions 45 11.3 Postfix Expressions 45 11.3.1 Postfix Increment Operator 45 11.3.2 Postfix Decrement Operator 45 11.4 Unary Operators 46 11.4.1 The delete Operator 46 11.4.2 The void Operator 46 11.4.3 The typeof Operator 46 11.4.4 Prefix Increment Operator 47 11.4.5 Prefix Decrement Operator 47 11.4.6 Unary + Operator 47 11.4.7 Unary - Operator 47 11.4.8 Bitwise NOT Operator ( ~) 48 11.4.9 Logical NOT Operator ( !) 48 11.5 Multiplicative Operators 48 11.5.1 Applying the * Operator 48 11.5.2 Applying the / Operator 49 11.5.3 Applying the % Operator 49 11.6 Additive Operators 50 11.6.1 The Addition operator ( +) 50 11.6.2 The Subtraction Operator ( -) 50 11.6.3 Applying the Additive Operators ( +,- ) to Numbers 51 11.7 Bitwise Shift Operators 51 11.7.1 The Left Shift Operator ( <<) 51 11.7.2 The Signed Right Shift Operator ( >>) 51 11.7.3 The Unsigned Right Shift Operator ( >>>) 52 11.4 Relational Operators 52 11.8.1 The Less-than Operator ( <) 53 11.8.2 The Greater-than Operator ( >) 53 11.8.3 The Less-than-or-equal Operator ( <=) 53 11.8.4 The Greater-than-or-equal Operator ( >=) 53 11.8.5 The Abstract Relational Comparison Algorithm 53 - iv - 11.8.6 The instanceof operator 54 11.8.7 The in operator 54 11.9 Equality Operators 54 11.9.1 The Equals Operator ( ==) 55 11.9.2 The Does-not-equals Operator ( !=) 55 11.9.3 The Abstract Equality Comparison Algorithm 55 11.9.4 The Strict Equals Operator ( ===) 56 11.9.5 The Strict Does-not-equal Operator ( !==) 56 11.9.6 The Strict Equality Comparison Algorithm 56 11.10 Binary Bitwise Operators 57 11.11 Binary Logical Operators 58 11.12 Conditional Operator ( ?: ) 58 11.13 Assignment Operators 59 11.13.1 Simple Assignment ( =) 59 11.13.2 Compound Assignment ( op=) 60 11.14 Comma Operator ( , ) 60 12 Statements 61 12.1 Block 61 12.2 Variable statement 62 12.3 Empty Statement 63 12.4 Expression Statement 63 12.5 The if Statement 63 12.6 Iteration Statements 64 12.6.1 The do-while Statement 64 12.6.2 The while statement 64 12.6.3 The for Statement 65 12.6.4 The for-in Statement 65 12.7 The continue Statement 66 12.8 The break Statement 67 12.9 The return Statement 67 12.10 The with Statement 67 12.11 The switch Statement 68 12.12 Labelled Statements 69 12.13 The throw statement 69 12.14 The try statement 70 13 Function Definition 71 13.1 Definitions 72 13.1.1 Equated Grammar Productions 72 13.1.2 Joined Objects 72 13.2 Creating Function Objects 72 13.2.1 [[Call]] 73 13.2.2 [[Construct]] 74 14 Program 75 15 Native ECMAScript Objects 76 15.1 The Global Object 76 15.1.1 Value Properties of the Global Object 77 15.1.2 Function Properties of the Global Object 77 15.1.3 URI Handling Function Properties 78 - v - 15.1.4 Constructor Properties of the Global Object 83 15.1.5 Other Properties of the Global Object 83 15.2 Object Objects 83 15.2.1 The Object Constructor Called as a Function 83 15.2.2 The Object Constructor 84 15.2.3 Properties of the Object Constructor 84 15.2.4 Properties of the Object Prototype Object 84 15.2.5 Properties of Object Instances 85 15.3 Function Objects 85 '){
+ throw new Test262Error('#2: Large string 8192 bytes');
+}
+//
+////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A7.1.js b/js/src/tests/test262/language/types/string/S8.4_A7.1.js
new file mode 100644
index 0000000000..80c63885d1
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A7.1.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.
+
+/*---
+esid: sec-line-terminators
+description: >
+ Line terminator <LF> may appear as an escape sequence within a StringLiteral
+info: |
+ A line terminator cannot occur within any token except a StringLiteral, Template, or TemplateSubstitutionTail.
+---*/
+
+assert.throws(ReferenceError, function() {
+ eval("var x = asdf\u000Aghjk");
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A7.2.js b/js/src/tests/test262/language/types/string/S8.4_A7.2.js
new file mode 100644
index 0000000000..45652a1b51
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A7.2.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-line-terminators
+description: >
+ Line terminator <CR> may appear as an escape sequence within a StringLiteral
+info: |
+ A line terminator cannot occur within any token except a StringLiteral, Template, or TemplateSubstitutionTail.
+---*/
+
+assert.throws(ReferenceError, function() {
+ eval("var x = asdf\u000Dghjk");
+});
+
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A7.3.js b/js/src/tests/test262/language/types/string/S8.4_A7.3.js
new file mode 100644
index 0000000000..e6cf456070
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A7.3.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.
+
+/*---
+esid: sec-line-terminators
+description: >
+ Line terminator <PS> may appear as an escape sequence within a StringLiteral
+info: |
+ A line terminator cannot occur within any token except a StringLiteral, Template, or TemplateSubstitutionTail.
+---*/
+
+assert.throws(ReferenceError, function() {
+ eval("var x = asdf\u2028ghjk");
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A7.4.js b/js/src/tests/test262/language/types/string/S8.4_A7.4.js
new file mode 100644
index 0000000000..de9d605b69
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A7.4.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-line-terminators
+description: >
+ Line terminator <LS> may appear as an escape sequence within a StringLiteral
+info: |
+ A line terminator cannot occur within any token except a StringLiteral, Template, or TemplateSubstitutionTail.
+
+---*/
+
+assert.throws(ReferenceError, function() {
+ eval("var x = asdf\u2029ghjk");
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A8.js b/js/src/tests/test262/language/types/string/S8.4_A8.js
new file mode 100644
index 0000000000..c192e07993
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A8.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ Empty string, 0, false are all equal (==) to each other, since they all
+ evaluate to 0
+es5id: 8.4_A8
+description: Compare empty string with undefined, null, 0 and false
+---*/
+
+var str='';
+
+////////////////////////////////////////////////////////////
+// CHECK#1
+if (str == undefined){
+ throw new Test262Error('#1: Empty string and undefined are not equal (!=) to each other');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#2
+if (str == null){
+ throw new Test262Error('#1: Empty string and Null are not equal (!=) to each other');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#3
+if (str != 0){
+ throw new Test262Error('#3: Empty string and 0 are equal (==) to each other, since they all evaluate to 0');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#4
+if (str != false){
+ throw new Test262Error('#4: Empty string and false are equal (==) to each other, since they all evaluate to 0');
+}
+//
+/////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A9_T1.js b/js/src/tests/test262/language/types/string/S8.4_A9_T1.js
new file mode 100644
index 0000000000..3e76f2e642
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A9_T1.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment to string literals calls String constructor
+es5id: 8.4_A9_T1
+description: Simple string variable compare with object String
+---*/
+
+var str='ABC';
+var strObj=new String('ABC');
+
+////////////////////////////////////////////////////////////
+// CHECK#1
+if (str.constructor !== strObj.constructor){
+ throw new Test262Error('#1: \'ABC\'.constructor === new String(\'ABC\').constructor');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#2
+if (str != strObj){
+ throw new Test262Error('#2: "ABC" == new String("ABC")');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#3
+if (str === strObj){
+ throw new Test262Error('#3: "ABC" !== new String("ABC")');
+}
+//
+/////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A9_T2.js b/js/src/tests/test262/language/types/string/S8.4_A9_T2.js
new file mode 100644
index 0000000000..6c6ef183a2
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A9_T2.js
@@ -0,0 +1,64 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment to string literals calls String constructor
+es5id: 8.4_A9_T2
+description: >
+ Compare empty string variable, object String('') and object
+ String()
+---*/
+
+var str="";
+var strObj=new String("");
+var strObj_=new String();
+
+////////////////////////////////////////////////////////////
+// CHECK#1
+if (str.constructor !== strObj.constructor){
+ throw new Test262Error('#1: "".constructor === new String("").constructor');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#2
+if (str.constructor !== strObj_.constructor){
+ throw new Test262Error('#2: "".constructor === new String().constructor');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#3
+if (str != strObj){
+ throw new Test262Error('#3: values of str=""; and strObj=new String(""); are equal');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#4
+if (str === strObj){
+ throw new Test262Error('#4: objects of str=""; and strObj=new String(""); are different');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#5
+if (str != strObj_){
+ throw new Test262Error('#5: values of str=""; and strObj=new String(); are equal');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#6
+if (str === strObj_){
+ throw new Test262Error('#6: objects of str=""; and strObj=new String(); are different');
+}
+//
+/////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/S8.4_A9_T3.js b/js/src/tests/test262/language/types/string/S8.4_A9_T3.js
new file mode 100644
index 0000000000..32f14b670a
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/S8.4_A9_T3.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment to string literals calls String constructor
+es5id: 8.4_A9_T3
+description: Simple empty string variable compare with empty object String
+---*/
+
+var str="";
+var strObj=new String;
+
+////////////////////////////////////////////////////////////
+// CHECK#1
+if (str.constructor !== strObj.constructor){
+ throw new Test262Error('#1: "".constructor === new String.constructor');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#2
+if (str != strObj){
+ throw new Test262Error('#2: values of str=""; and strObj=new String(""); are equal');
+}
+//
+/////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// CHECK#3
+if (str === strObj){
+ throw new Test262Error('#3: objects of str=""; and strObj=new String(""); are different');
+}
+//
+/////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (typeof str == typeof strObj){
+ throw new Test262Error('#4: types of str=""; and strObj=new String(""); are different');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/string/browser.js b/js/src/tests/test262/language/types/string/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/browser.js
diff --git a/js/src/tests/test262/language/types/string/shell.js b/js/src/tests/test262/language/types/string/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/string/shell.js
diff --git a/js/src/tests/test262/language/types/undefined/S8.1_A1_T1.js b/js/src/tests/test262/language/types/undefined/S8.1_A1_T1.js
new file mode 100644
index 0000000000..b1d896cef5
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/S8.1_A1_T1.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.
+
+/*---
+info: The Undefined type has one value, called undefined
+es5id: 8.1_A1_T1
+description: Checking if execution of "var x = undefined" passes
+---*/
+
+// CHECK#1
+var x = undefined;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/undefined/S8.1_A1_T2.js b/js/src/tests/test262/language/types/undefined/S8.1_A1_T2.js
new file mode 100644
index 0000000000..a212e94285
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/S8.1_A1_T2.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The Undefined type has one value, called undefined
+es5id: 8.1_A1_T2
+description: Check typeof(undefined) and typeof(void 0)
+---*/
+
+// CHECK#1
+if (!(typeof(undefined) === "undefined")) {
+ ERROR('#1: typeof(undefined) === "undefined". Actual: ' + (typeof(undefined)));
+}
+
+// CHECK#2
+if (!(typeof(void 0) === "undefined")) {
+ ERROR('#2: typeof(void 0) === "undefined". Actual: ' + (typeof(void 0)));
+}
+
+// CHECK#3
+if (!(undefined === void 0)) {
+ ERROR('#3: undefined === void 0');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/undefined/S8.1_A2_T1.js b/js/src/tests/test262/language/types/undefined/S8.1_A2_T1.js
new file mode 100644
index 0000000000..979643fe26
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/S8.1_A2_T1.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Any variable that has not been assigned a value has the value undefined
+es5id: 8.1_A2_T1
+description: Check that var x have value and type undefined
+---*/
+
+var x;
+
+///////////////////////////////////////////////////////////////////
+// CHECK#1
+if (!(x === undefined)) {
+ throw new Test262Error('#1: var x; x === undefined. Actual: ' + (x));
+}
+//
+///////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+// CHECK#2
+if (!(typeof(x) === "undefined")) {
+ throw new Test262Error('#2: var x; typeof(x) === "undefined". Actual: ' + (typeof(x)));
+}
+//
+///////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+// CHECK#3
+if (!(x === void 0)) {
+ throw new Test262Error('#3: var x; x === void 0. Actual: ' + (x));
+}
+//
+///////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/undefined/S8.1_A2_T2.js b/js/src/tests/test262/language/types/undefined/S8.1_A2_T2.js
new file mode 100644
index 0000000000..f764573a4e
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/S8.1_A2_T2.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Any variable that has not been assigned a value has the value undefined
+es5id: 8.1_A2_T2
+description: Function return undefined
+---*/
+
+// CHECK#1
+function test1(x) {
+ return x;
+}
+
+if (!(test1() === void 0)) {
+ throw new Test262Error('#1: function test1(x){return x} test1() === void 0. Actual: ' + (test1()));
+}
+
+// CHECK#2
+function test2() {
+}
+
+if (!(test2() === void 0)) {
+ throw new Test262Error('#2: function test2(){} test2() === void 0. Actual: ' + (test2()));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/undefined/S8.1_A3_T1.js b/js/src/tests/test262/language/types/undefined/S8.1_A3_T1.js
new file mode 100644
index 0000000000..8df494237e
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/S8.1_A3_T1.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: undefined is not a keyword
+es5id: 8.1_A3
+description: Create variable named undefined
+---*/
+
+//////////////////////////////////////////////////////////
+// CHECK1#
+var undefined;
+//
+//////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/undefined/S8.1_A3_T2.js b/js/src/tests/test262/language/types/undefined/S8.1_A3_T2.js
new file mode 100644
index 0000000000..c0003ac62f
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/S8.1_A3_T2.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: undefined is not a keyword
+es5id: 8.1_A3
+description: Create variable named undefined
+flags: [noStrict]
+---*/
+
+//////////////////////////////////////////////////////////
+// CHECK1#
+var undefined = 1;
+//
+//////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/undefined/S8.1_A4.js b/js/src/tests/test262/language/types/undefined/S8.1_A4.js
new file mode 100644
index 0000000000..53d3f74886
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/S8.1_A4.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.
+
+/*---
+info: If property of object not exist, return undefined
+es5id: 8.1_A4
+description: Check value of not existed property
+---*/
+
+// CHECK#1
+if ((new Object()).newProperty !== undefined) {
+ throw new Test262Error('#1: (new Object()).newProperty === undefined. Actual: ' + ((new Object()).newProperty));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/undefined/S8.1_A5.js b/js/src/tests/test262/language/types/undefined/S8.1_A5.js
new file mode 100644
index 0000000000..8cc74ec664
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/S8.1_A5.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Function argument that isn't provided has a value of undefined
+es5id: 8.1_A5
+description: Call function without provided argument
+---*/
+
+///////////////////////////////////////
+//
+function test(arg) {
+// Check and make sure that arg is not undefined
+ if (typeof(arg) !== "undefined") {
+ throw new Test262Error('#1: Function argument that isn\'t provided has a value of undefined. Actual: ' + (typeof(arg)));
+ }
+}
+
+test();
+//
+////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/types/undefined/browser.js b/js/src/tests/test262/language/types/undefined/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/browser.js
diff --git a/js/src/tests/test262/language/types/undefined/shell.js b/js/src/tests/test262/language/types/undefined/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/types/undefined/shell.js