summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/String/fromCharCode
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/String/fromCharCode')
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A1.js34
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A2.js18
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A3_T1.js18
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A3_T2.js24
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A4.js25
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A1.js54
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A2.1.js57
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A2.2.js72
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T1.js20
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T2.js20
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T3.js20
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T4.js129
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.2_T1.js22
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/name.js28
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/not-a-constructor.js31
-rw-r--r--js/src/tests/test262/built-ins/String/fromCharCode/shell.js0
17 files changed, 572 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A1.js b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A1.js
new file mode 100644
index 0000000000..0d34147bfa
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A1.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: The length property of the fromCharCode function is 1
+es5id: 15.5.3.2_A1
+description: Checking String.fromCharCode.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof String.fromCharCode !== "function") {
+ throw new Test262Error('#1: typeof String.fromCharCode === "function". Actual: typeof String.fromCharCode ===' + typeof String.fromCharCode);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (!(String.hasOwnProperty("fromCharCode"))) {
+ throw new Test262Error('#2: String.hasOwnProperty("fromCharCode") return true. Actual: ' + String.hasOwnProperty("fromCharCode"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (String.fromCharCode.length !== 1) {
+ throw new Test262Error('#3: String.fromCharCode.length === 1. Actual: String.fromCharCode.length ===' + String.fromCharCode.length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A2.js b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A2.js
new file mode 100644
index 0000000000..1584c3ad73
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A2.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.
+
+/*---
+info: String.fromCharCode () returns empty string
+es5id: 15.5.3.2_A2
+description: Call String.fromCharCode()
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.fromCharCode() !== "") {
+ throw new Test262Error('#1: String.fromCharCode () returns empty string. Actual: ' + String.fromCharCode());
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A3_T1.js b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A3_T1.js
new file mode 100644
index 0000000000..fb9e1e5e3c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A3_T1.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.
+
+/*---
+info: String.fromCharCode ( [ char0 [ , char1 [ , ... ] ] ] )
+es5id: 15.5.3.2_A3_T1
+description: Call String.fromCharCode(65,66,66,65)
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.fromCharCode(65, 66, 66, 65) !== "ABBA") {
+ throw new Test262Error('#1: String.fromCharCode(65,66,66,65) === "ABBA". Actual: String.fromCharCode(65,66,66,65) ===' + String.fromCharCode(65, 66, 66, 65));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A3_T2.js b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A3_T2.js
new file mode 100644
index 0000000000..3ae78b1237
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A3_T2.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: String.fromCharCode ( [ char0 [ , char1 [ , ... ] ] ] )
+es5id: 15.5.3.2_A3_T2
+description: >
+ Create function variable, that equal String.fromCharCode, delete
+ original String.fromCharCode and use created variable
+---*/
+
+var __fcc__func = String.fromCharCode;
+
+delete String.fromCharCode;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__fcc__func(65, 66, 66, 65) !== "ABBA") {
+ throw new Test262Error('#1: __fcc__func = String.fromCharCode; delete String.fromCharCode; __fcc__func(65,66,66,65) === "ABBA". Actual: __fcc__func(65,66,66,65) ===' + __fcc__func(65, 66, 66, 65));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A4.js b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A4.js
new file mode 100644
index 0000000000..321612c888
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S15.5.3.2_A4.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: String.fromCharCode has not [[construct]] method
+es5id: 15.5.3.2_A4
+description: Checking if creating "new String.fromCharCode" fails
+---*/
+
+var __fcc__func = String.fromCharCode;
+
+delete String.fromCharCode;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var __obj = new __fcc__func(65, 66, 66, 65);
+ throw new Test262Error('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception');
+} catch (e) {
+ if (e instanceof Test262Error) throw e;
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A1.js b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A1.js
new file mode 100644
index 0000000000..098d5c3f72
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A1.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: If value is NaN, +0, -0, +Infinity, or -Infinity, return +0
+es5id: 9.7_A1
+description: >
+ For testing use String.fromCharCode(Number).charCodeAt(0)
+ construction
+---*/
+
+// CHECK#1
+if (String.fromCharCode(Number.NaN).charCodeAt(0) !== +0) {
+ throw new Test262Error('#1.1: String.fromCharCode(Number.NaN).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number.NaN).charCodeAt(0)));
+} else if (1 / String.fromCharCode(Number.NaN).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
+ throw new Test262Error('#1.2: String.fromCharCode(Number.NaN).charCodeAt(0) === +0. Actual: -0');
+}
+
+// CHECK#2
+if (String.fromCharCode(Number("abc")).charCodeAt(0) !== +0) {
+ throw new Test262Error('#2.1: String.fromCharCode(Number("abc")).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number("abc")).charCodeAt(0)));
+} else if (1 / String.fromCharCode(0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
+ throw new Test262Error('#2.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');
+}
+
+// CHECK#3
+if (String.fromCharCode(0).charCodeAt(0) !== +0) {
+ throw new Test262Error('#3.1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0)));
+} else if (1 / String.fromCharCode(0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
+ throw new Test262Error('#3.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');
+}
+
+// CHECK#4
+if (String.fromCharCode(-0).charCodeAt(0) !== +0) {
+ throw new Test262Error("#4.1: String.fromCharCode(-0).charCodeAt(0) === +0");
+} else if (1 / String.fromCharCode(-0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
+ throw new Test262Error("#4.2: String.fromCharCode(-0).charCodeAt(0) === +0. Actual: -0");
+}
+
+// CHECK#5
+if (String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) !== +0) {
+ throw new Test262Error('#5.1: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0)));
+} else if (1 / String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
+ throw new Test262Error('#5.2: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === +0. Actual: -0');
+}
+
+// CHECK#6
+if (String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== +0) {
+ throw new Test262Error("#6.1: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0");
+} else if (1 / String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
+ throw new Test262Error("#6.2: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0. Actual: -0");
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A2.1.js b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A2.1.js
new file mode 100644
index 0000000000..8942031757
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A2.1.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: ToUint16 returns values between 0 and 2^16-1
+es5id: 9.7_A2.1
+description: >
+ Converting numbers, which are in\outside of Uint16 scopes, with
+ String.fromCharCode(Number).charCodeAt(0) construction
+---*/
+
+// CHECK#1
+if (String.fromCharCode(0).charCodeAt(0) !== 0) {
+ throw new Test262Error('#1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0)));
+}
+
+// CHECK#2
+if (String.fromCharCode(1).charCodeAt(0) !== 1) {
+ throw new Test262Error('#2: String.fromCharCode(1).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(1).charCodeAt(0)));
+}
+
+// CHECK#3
+if (String.fromCharCode(-1).charCodeAt(0) !== 65535) {
+ throw new Test262Error('#3: String.fromCharCode(-1).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1).charCodeAt(0)));
+}
+
+// CHECK#4
+if (String.fromCharCode(65535).charCodeAt(0) !== 65535) {
+ throw new Test262Error('#4: String.fromCharCode(65535).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(65535).charCodeAt(0)));
+}
+
+// CHECK#5
+if (String.fromCharCode(65534).charCodeAt(0) !== 65534) {
+ throw new Test262Error('#5: String.fromCharCode(65534).charCodeAt(0) === 65534. Actual: ' + (String.fromCharCode(65534).charCodeAt(0)));
+}
+
+// CHECK#6
+if (String.fromCharCode(65536).charCodeAt(0) !== 0) {
+ throw new Test262Error('#6: String.fromCharCode(65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(65536).charCodeAt(0)));
+}
+
+// CHECK#7
+if (String.fromCharCode(4294967295).charCodeAt(0) !== 65535) {
+ throw new Test262Error('#7: String.fromCharCode(4294967295).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(4294967295).charCodeAt(0)));
+}
+
+// CHECK#8
+if (String.fromCharCode(4294967294).charCodeAt(0) !== 65534) {
+ throw new Test262Error('#8: String.fromCharCode(4294967294).charCodeAt(0) === 65534. Actual: ' + (String.fromCharCode(4294967294).charCodeAt(0)));
+}
+
+// CHECK#9
+if (String.fromCharCode(4294967296).charCodeAt(0) !== 0) {
+ throw new Test262Error('#9: String.fromCharCode(4294967296).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(4294967296).charCodeAt(0)));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A2.2.js b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A2.2.js
new file mode 100644
index 0000000000..8c5c28d75d
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A2.2.js
@@ -0,0 +1,72 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Compute result modulo 2^16
+es5id: 9.7_A2.2
+description: >
+ For testing use String.fromCharCode(Number).charCodeAt(0)
+ construction
+---*/
+
+// CHECK#1
+if (String.fromCharCode(-32767).charCodeAt(0) !== 32769) {
+ throw new Test262Error('#1: String.fromCharCode(-32767).charCodeAt(0) === 32769. Actual: ' + (String.fromCharCode(-32767).charCodeAt(0)));
+}
+
+// CHECK#2
+if (String.fromCharCode(-32768).charCodeAt(0) !== 32768) {
+ throw new Test262Error('#2: String.fromCharCode(-32768).charCodeAt(0) === 32768. Actual: ' + (String.fromCharCode(-32768).charCodeAt(0)));
+}
+
+// CHECK#3
+if (String.fromCharCode(-32769).charCodeAt(0) !== 32767) {
+ throw new Test262Error('#3: String.fromCharCode(-32769).charCodeAt(0) === 32767. Actual: ' + (String.fromCharCode(-32769).charCodeAt(0)));
+}
+
+// CHECK#4
+if (String.fromCharCode(-65535).charCodeAt(0) !== 1) {
+ throw new Test262Error('#4: String.fromCharCode(-65535).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(-65535).charCodeAt(0)));
+}
+
+// CHECK#5
+if (String.fromCharCode(-65536).charCodeAt(0) !== 0) {
+ throw new Test262Error('#5: String.fromCharCode(-65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(-65536).charCodeAt(0)));
+}
+
+// CHECK#6
+if (String.fromCharCode(-65537).charCodeAt(0) !== 65535) {
+ throw new Test262Error('#6: String.fromCharCode(-65537).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-65537).charCodeAt(0)));
+}
+
+// CHECK#7
+if (String.fromCharCode(65535).charCodeAt(0) !== 65535) {
+ throw new Test262Error('#7: String.fromCharCode(65535).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(65535).charCodeAt(0)));
+}
+
+// CHECK#8
+if (String.fromCharCode(65536).charCodeAt(0) !== 0) {
+ throw new Test262Error('#8: String.fromCharCode(65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(65536).charCodeAt(0)));
+}
+
+// CHECK#9
+if (String.fromCharCode(65537).charCodeAt(0) !== 1) {
+ throw new Test262Error('#9: String.fromCharCode(65537).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(65537).charCodeAt(0)));
+}
+
+// CHECK#10
+if (String.fromCharCode(131071).charCodeAt(0) !== 65535) {
+ throw new Test262Error('#10: String.fromCharCode(131071).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(131071).charCodeAt(0)));
+}
+
+// CHECK#11
+if (String.fromCharCode(131072).charCodeAt(0) !== 0) {
+ throw new Test262Error('#11: String.fromCharCode(131072).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(131072).charCodeAt(0)));
+}
+
+// CHECK#12
+if (String.fromCharCode(131073).charCodeAt(0) !== 1) {
+ throw new Test262Error('#12: String.fromCharCode(131073).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(131073).charCodeAt(0)));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T1.js b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T1.js
new file mode 100644
index 0000000000..aade671307
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_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: Operator uses ToNumber
+es5id: 9.7_A3.1_T1
+description: Type(x) is Boolean
+---*/
+
+// CHECK#1
+if (String.fromCharCode(new Boolean(true)).charCodeAt(0) !== 1) {
+ throw new Test262Error('#1: String.fromCharCode(new Boolean(true)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new Boolean(true)).charCodeAt(0)));
+}
+
+// CHECK#2
+if (String.fromCharCode(false).charCodeAt(0) !== 0) {
+ throw new Test262Error('#2: String.fromCharCode(false).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(false).charCodeAt(0)));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T2.js b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T2.js
new file mode 100644
index 0000000000..540608c677
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_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: Operator uses ToNumber
+es5id: 9.7_A3.1_T2
+description: Type(x) is Number
+---*/
+
+// CHECK#1
+if (String.fromCharCode(new Number(1)).charCodeAt(0) !== 1) {
+ throw new Test262Error('#1: String.fromCharCode(new Number(1)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new Number(1)).charCodeAt(0)));
+}
+
+// CHECK#2
+if (String.fromCharCode(-1.234).charCodeAt(0) !== 65535) {
+ throw new Test262Error('#2: String.fromCharCode(-1.234).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1.234).charCodeAt(0)));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T3.js b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T3.js
new file mode 100644
index 0000000000..0235d4a5b2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T3.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: Operator uses ToNumber
+es5id: 9.7_A3.1_T3
+description: Type(x) is String
+---*/
+
+// CHECK#1
+if (String.fromCharCode(new String(1)).charCodeAt(0) !== 1) {
+ throw new Test262Error('#1: String.fromCharCode(new String(1)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new String(1)).charCodeAt(0)));
+}
+
+// CHECK#2
+if (String.fromCharCode("-1.234").charCodeAt(0) !== 65535) {
+ throw new Test262Error('#2: String.fromCharCode("-1.234").charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode("-1.234").charCodeAt(0)));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T4.js b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T4.js
new file mode 100644
index 0000000000..4df691b949
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.1_T4.js
@@ -0,0 +1,129 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Operator uses ToNumber
+es5id: 9.7_A3.1_T4
+description: Type(x) is Object
+---*/
+
+//CHECK#1
+var object = {
+ valueOf: function() {
+ return 1
+ }
+};
+if (String.fromCharCode(object).charCodeAt(0) !== 1) {
+ throw new Test262Error('#1: var object = {valueOf: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
+}
+
+//CHECK#2
+var object = {
+ valueOf: function() {
+ return 1
+ },
+ toString: function() {
+ return 0
+ }
+};
+if (String.fromCharCode(object).charCodeAt(0) !== 1) {
+ throw new Test262Error('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
+}
+
+//CHECK#3
+var object = {
+ valueOf: function() {
+ return 1
+ },
+ toString: function() {
+ return {}
+ }
+};
+if (String.fromCharCode(object).charCodeAt(0) !== 1) {
+ throw new Test262Error('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
+}
+
+//CHECK#4
+try {
+ var object = {
+ valueOf: function() {
+ return 1
+ },
+ toString: function() {
+ throw "error"
+ }
+ };
+ if (String.fromCharCode(object).charCodeAt(0) !== 1) {
+ throw new Test262Error('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
+ }
+}
+catch (e) {
+ if (e === "error") {
+ throw new Test262Error('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; object not throw "error"');
+ } else {
+ throw new Test262Error('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; object not throw Error. Actual: ' + (e));
+ }
+}
+
+//CHECK#5
+var object = {
+ toString: function() {
+ return 1
+ }
+};
+if (String.fromCharCode(object).charCodeAt(0) !== 1) {
+ throw new Test262Error('#5: var object = {toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
+}
+
+//CHECK#6
+var object = {
+ valueOf: function() {
+ return {}
+ },
+ toString: function() {
+ return 1
+ }
+}
+if (String.fromCharCode(object).charCodeAt(0) !== 1) {
+ throw new Test262Error('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
+}
+
+//CHECK#7
+try {
+ var object = {
+ valueOf: function() {
+ throw "error"
+ },
+ toString: function() {
+ return 1
+ }
+ };
+ object >>> 0;
+ throw new Test262Error('#7.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; object throw "error". Actual: ' + (object >>> 0));
+}
+catch (e) {
+ if (e !== "error") {
+ throw new Test262Error('#7.2: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; object throw "error". Actual: ' + (e));
+ }
+}
+
+//CHECK#8
+try {
+ var object = {
+ valueOf: function() {
+ return {}
+ },
+ toString: function() {
+ return {}
+ }
+ };
+ object >>> 0;
+ throw new Test262Error('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (object >>> 0));
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ throw new Test262Error('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (e));
+ }
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.2_T1.js b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.2_T1.js
new file mode 100644
index 0000000000..3efb74756c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/S9.7_A3.2_T1.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Operator uses floor, abs
+es5id: 9.7_A3.2_T1
+description: >
+ For testing use String.fromCharCode(Number).charCodeAt(0)
+ construction
+---*/
+
+// CHECK#1
+if (String.fromCharCode(1.2345).charCodeAt(0) !== 1) {
+ throw new Test262Error('#1: String.fromCharCode(1.2345).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(1.2345).charCodeAt(0)));
+}
+
+// CHECK#2
+if (String.fromCharCode(-5.4321).charCodeAt(0) !== 65531) {
+ throw new Test262Error('#2: String.fromCharCode(-5.4321).charCodeAt(0) === 65531. Actual: ' + (String.fromCharCode(-5.4321).charCodeAt(0)));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/browser.js b/js/src/tests/test262/built-ins/String/fromCharCode/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/browser.js
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/name.js b/js/src/tests/test262/built-ins/String/fromCharCode/name.js
new file mode 100644
index 0000000000..aad7ed2c18
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/name.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es6id: 21.1.2.1
+description: >
+ String.fromCharCode.name is "fromCharCode".
+info: |
+ String.fromCharCode ( ...codeUnits )
+
+ 17 ECMAScript Standard Built-in Objects:
+ Every built-in Function object, including constructors, that is not
+ identified as an anonymous function has a name property whose value
+ is a String.
+
+ Unless otherwise specified, the name property of a built-in Function
+ object, if it exists, has the attributes { [[Writable]]: false,
+ [[Enumerable]]: false, [[Configurable]]: true }.
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(String.fromCharCode.name, "fromCharCode");
+
+verifyNotEnumerable(String.fromCharCode, "name");
+verifyNotWritable(String.fromCharCode, "name");
+verifyConfigurable(String.fromCharCode, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/not-a-constructor.js b/js/src/tests/test262/built-ins/String/fromCharCode/not-a-constructor.js
new file mode 100644
index 0000000000..2076c9b6ab
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/not-a-constructor.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ String.fromCharCode does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, arrow-function]
+---*/
+
+assert.sameValue(isConstructor(String.fromCharCode), false, 'isConstructor(String.fromCharCode) must return false');
+
+assert.throws(TypeError, () => {
+ new String.fromCharCode();
+}, '`new String.fromCharCode()` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/String/fromCharCode/shell.js b/js/src/tests/test262/built-ins/String/fromCharCode/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/String/fromCharCode/shell.js