summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch09/9.5
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/tests/test262/ch09/9.5
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/test262/ch09/9.5')
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A1_T1.js52
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A2.1_T1.js50
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A2.1_T2.js30
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A2.2_T1.js70
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A2.2_T2.js70
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A2.3_T1.js42
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A2.3_T2.js40
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A3.1_T1.js20
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A3.1_T2.js20
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A3.1_T3.js20
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A3.1_T4.js79
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A3.2_T1.js20
-rw-r--r--js/src/tests/test262/ch09/9.5/S9.5_A3.2_T2.js20
-rw-r--r--js/src/tests/test262/ch09/9.5/browser.js0
-rw-r--r--js/src/tests/test262/ch09/9.5/shell.js0
15 files changed, 533 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A1_T1.js b/js/src/tests/test262/ch09/9.5/S9.5_A1_T1.js
new file mode 100644
index 000000000..76296a3a9
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A1_T1.js
@@ -0,0 +1,52 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If value is NaN, +0, -0, +Infinity, or -Infinity, return +0
+ *
+ * @path ch09/9.5/S9.5_A1_T1.js
+ * @description For testing use operator <<0
+ */
+
+// CHECK#1
+if ((Number.NaN << 0) !== +0) {
+ $ERROR('#1.1: (Number.NaN << 0) === 0. Actual: ' + ((Number.NaN << 0)));
+} else if (1/(Number.NaN << 0) !== Number.POSITIVE_INFINITY) {
+ $ERROR('#1.2: (Number.NaN << 0) === +0. Actual: -0');
+}
+
+// CHECK#2
+if ((Number("abc") << 0) !== +0) {
+ $ERROR('#2.1: (Number("abc") << 0) === 0. Actual: ' + ((Number("abc") << 0)));
+} else if (1/(0 << 0) !== Number.POSITIVE_INFINITY) {
+ $ERROR('#2.2: (0 << 0) === +0. Actual: -0');
+}
+
+// CHECK#3
+if ((0 << 0) !== +0) {
+ $ERROR('#3.1: (0 << 0) === 0. Actual: ' + ((0 << 0)));
+} else if (1/(0 << 0) !== Number.POSITIVE_INFINITY) {
+ $ERROR('#3.2: (0 << 0) === +0. Actual: -0');
+}
+
+// CHECK#4
+if ((-0 << 0) !== +0) {
+ $ERROR("#4.1: (-0 << 0) === 0");
+} else if (1/(-0 << 0) !== Number.POSITIVE_INFINITY) {
+ $ERROR("#4.2: (-0 << 0) === +0. Actual: -0");
+}
+
+// CHECK#5
+if ((Number.POSITIVE_INFINITY << 0) !== +0) {
+ $ERROR('#5.1: (Number.POSITIVE_INFINITY << 0) === 0. Actual: ' + ((Number.POSITIVE_INFINITY << 0)));
+} else if (1/(Number.POSITIVE_INFINITY << 0) !== Number.POSITIVE_INFINITY) {
+ $ERROR('#5.2: (Number.POSITIVE_INFINITY << 0) === +0. Actual: -0');
+}
+
+// CHECK#6
+if ((Number.NEGATIVE_INFINITY << 0) !== +0) {
+ $ERROR("#6.1: (Number.NEGATIVE_INFINITY << 0) === 0");
+} else if (1/(Number.NEGATIVE_INFINITY << 0) !== Number.POSITIVE_INFINITY) {
+ $ERROR("#6.2: (Number.NEGATIVE_INFINITY << 0) === +0. Actual: -0");
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A2.1_T1.js b/js/src/tests/test262/ch09/9.5/S9.5_A2.1_T1.js
new file mode 100644
index 000000000..943425e85
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A2.1_T1.js
@@ -0,0 +1,50 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * ToInt32 returns values between -2^31 and 2^31-1
+ *
+ * @path ch09/9.5/S9.5_A2.1_T1.js
+ * @description Converting some numbers, which are in\outside of Int32 scopes, with <<0 operator
+ */
+
+// CHECK#1
+if ((-2147483647 << 0) !== -2147483647) {
+ $ERROR('#1: (-2147483647 << 0) === -2147483647. Actual: ' + ((-2147483647 << 0)));
+}
+
+// CHECK#2
+if ((-2147483648 << 0) !== -2147483648) {
+ $ERROR('#2: (-2147483648 << 0) === -2147483648. Actual: ' + ((-2147483648 << 0)));
+}
+
+// CHECK#3
+if ((-2147483649 << 0) !== 2147483647) {
+ $ERROR('#3: (-2147483649 << 0) === 2147483647. Actual: ' + ((-2147483649 << 0)));
+}
+
+// CHECK#4
+if ((-4294967296 << 0) !== 0) {
+ $ERROR('#4: (-4294967296 << 0) === 0. Actual: ' + ((-4294967296 << 0)));
+}
+
+// CHECK#5
+if ((2147483646 << 0) !== 2147483646) {
+ $ERROR('#5: (2147483646 << 0) === 2147483646. Actual: ' + ((2147483646 << 0)));
+}
+
+// CHECK#6
+if ((2147483647 << 0) !== 2147483647) {
+ $ERROR('#6: (2147483647 << 0) === 2147483647. Actual: ' + ((2147483647 << 0)));
+}
+
+// CHECK#7
+if ((2147483648 << 0) !== -2147483648) {
+ $ERROR('#7: (2147483648 << 0) === -2147483648. Actual: ' + ((2147483648 << 0)));
+}
+
+// CHECK#8
+if ((4294967296 << 0) !== 0) {
+ $ERROR('#8: (4294967296 << 0) === 0. Actual: ' + ((4294967296 << 0)));
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A2.1_T2.js b/js/src/tests/test262/ch09/9.5/S9.5_A2.1_T2.js
new file mode 100644
index 000000000..9037035c8
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A2.1_T2.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.
+
+/**
+ * ToInt32 returns values between -2^31 and 2^31-1
+ *
+ * @path ch09/9.5/S9.5_A2.1_T2.js
+ * @description Converting some numbers, which are in\outside of Int32 scopes, with ~ operator
+ */
+
+// CHECK#1
+if (~-2147483649 !== ~2147483647) {
+ $ERROR('#1: ~-2147483649 === ~2147483647');
+}
+
+// CHECK#2
+if (~-4294967296 !== ~0) {
+ $ERROR('#2: ~-4294967296 === ~0');
+}
+
+// CHECK#3
+if (~2147483648 !== ~-2147483648) {
+ $ERROR('#3: ~2147483648 === ~-2147483648');
+}
+
+// CHECK#4
+if (~4294967296 !== ~0) {
+ $ERROR('#4: ~4294967296 === ~0');
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A2.2_T1.js b/js/src/tests/test262/ch09/9.5/S9.5_A2.2_T1.js
new file mode 100644
index 000000000..e8c454498
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A2.2_T1.js
@@ -0,0 +1,70 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * Compute result modulo 2^32
+ *
+ * @path ch09/9.5/S9.5_A2.2_T1.js
+ * @description Use operator <<0
+ */
+
+// CHECK#1
+if ((-2147483647 << 0) !== -2147483647) {
+ $ERROR('#1: (-2147483647 << 0) === -2147483647. Actual: ' + ((-2147483647 << 0)));
+}
+
+// CHECK#2
+if ((-2147483648 << 0) !== -2147483648) {
+ $ERROR('#2: (-2147483648 << 0) === -2147483648. Actual: ' + ((-2147483648 << 0)));
+}
+
+// CHECK#3
+if ((-2147483649 << 0) !== 2147483647) {
+ $ERROR('#3: (-2147483649 << 0) === 2147483647. Actual: ' + ((-2147483649 << 0)));
+}
+
+// CHECK#4
+if ((4294967295 << 0) !== -1) {
+ $ERROR('#4: (4294967295 << 0) === -1. Actual: ' + ((4294967295 << 0)));
+}
+
+// CHECK#5
+if ((4294967296 << 0) !== 0) {
+ $ERROR('#5: (4294967296 << 0) === 0. Actual: ' + ((4294967296 << 0)));
+}
+
+// CHECK#6
+if ((4294967297 << 0) !== 1) {
+ $ERROR('#6: (4294967297 << 0) === 1. Actual: ' + ((4294967297 << 0)));
+}
+
+// CHECK#7
+if ((-4294967295 << 0) !== 1) {
+ $ERROR('#7: (-4294967295 << 0) === 1. Actual: ' + ((-4294967295 << 0)));
+}
+
+// CHECK#8
+if ((-4294967296 << 0) !== 0) {
+ $ERROR('#8: (-4294967296 << 0) === 0. Actual: ' + ((-4294967296 << 0)));
+}
+
+// CHECK#9
+if ((-4294967297 << 0) !== -1) {
+ $ERROR('#9: (-4294967297 << 0) === -1. Actual: ' + ((-4294967297 << 0)));
+}
+
+// CHECK#10
+if ((8589934591 << 0) !== -1) {
+ $ERROR('#10: (8589934591 << 0) === -1. Actual: ' + ((8589934591 << 0)));
+}
+
+// CHECK#11
+if ((8589934592 << 0) !== 0) {
+ $ERROR('#11: (8589934592 << 0) === 0. Actual: ' + ((8589934592 << 0)));
+}
+
+// CHECK#12
+if ((8589934593 << 0) !== 1) {
+ $ERROR('#12: (8589934593 << 0) === 1. Actual: ' + ((8589934593 << 0)));
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A2.2_T2.js b/js/src/tests/test262/ch09/9.5/S9.5_A2.2_T2.js
new file mode 100644
index 000000000..a138d03d7
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A2.2_T2.js
@@ -0,0 +1,70 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * Compute result modulo 2^32
+ *
+ * @path ch09/9.5/S9.5_A2.2_T2.js
+ * @description Use operator ~
+ */
+
+// CHECK#1
+if (~-2147483647 !== 2147483646) {
+ $ERROR('#1: ~-2147483647 === 2147483646)');
+}
+
+// CHECK#2
+if (~-2147483648 !== ~-2147483648) {
+ $ERROR('#2: ~-2147483648 ==== ~-2147483648)');
+}
+
+// CHECK#3
+if (~-2147483649 !== ~2147483647) {
+ $ERROR('#3: ~-2147483649 ==== ~2147483647)');
+}
+
+// CHECK#4
+if ((~4294967295 << 0) !== ~-1) {
+ $ERROR('#4: (~4294967295 << 0) === ~-1)');
+}
+
+// CHECK#5
+if ((~4294967296 << 0) !== ~0) {
+ $ERROR('#5: (~4294967296 << 0) === ~0)');
+}
+
+// CHECK#6
+if ((~4294967297 << 0) !== ~1) {
+ $ERROR('#6: (~4294967297 << 0) === ~1)');
+}
+
+// CHECK#7
+if ((~-4294967295 << 0) !== ~1) {
+ $ERROR('#7: (~-4294967295 << 0) === ~1)');
+}
+
+// CHECK#8
+if ((~-4294967296 << 0) !== ~0) {
+ $ERROR('#8: (~-4294967296 << 0) === ~0)');
+}
+
+// CHECK#9
+if ((~-4294967297 << 0) !== ~-1) {
+ $ERROR('#9: (~-4294967297 << 0) === ~-1)');
+}
+
+// CHECK#10
+if ((~8589934591 << 0) !== ~-1) {
+ $ERROR('#10: (~8589934591 << 0) === ~-1)');
+}
+
+// CHECK#11
+if ((~8589934592 << 0) !== ~0) {
+ $ERROR('#11: (~8589934592 << 0) === ~0)');
+}
+
+// CHECK#12
+if ((~8589934593 << 0) !== ~1) {
+ $ERROR('#12: (~8589934593 << 0) === ~1)');
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A2.3_T1.js b/js/src/tests/test262/ch09/9.5/S9.5_A2.3_T1.js
new file mode 100644
index 000000000..af0e3702e
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A2.3_T1.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.
+
+/**
+ * If result is greater than or equal to 2^31, return result -2^32
+ *
+ * @path ch09/9.5/S9.5_A2.3_T1.js
+ * @description Use operator <<0
+ */
+
+// CHECK#1
+if ((2147483647 << 0) !== 2147483647) {
+ $ERROR('#1: (2147483647 << 0) === 2147483647. Actual: ' + ((2147483647 << 0)));
+}
+
+// CHECK#2
+if ((2147483648 << 0) !== -2147483648) {
+ $ERROR('#2: (2147483648 << 0) === -2147483648. Actual: ' + ((2147483648 << 0)));
+}
+
+// CHECK#3
+if ((2147483649 << 0) !== -2147483647) {
+ $ERROR('#3: (2147483649 << 0) === -2147483647. Actual: ' + ((2147483649 << 0)));
+}
+
+// CHECK#4
+if ((4294967295 << 0) !== -1) {
+ $ERROR('#4: (4294967295 << 0) === -1. Actual: ' + ((4294967295 << 0)));
+}
+
+// CHECK#5
+if ((4294967296 << 0) !== 0) {
+ $ERROR('#5: (4294967296 << 0) === 0. Actual: ' + ((4294967296 << 0)));
+}
+
+// CHECK#6
+if ((4294967297 << 0) !== 1) {
+ $ERROR('#6: (4294967297 << 0) === 1. Actual: ' + ((4294967297 << 0)));
+}
+
+
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A2.3_T2.js b/js/src/tests/test262/ch09/9.5/S9.5_A2.3_T2.js
new file mode 100644
index 000000000..70c23270b
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A2.3_T2.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.
+
+/**
+ * If result is greater than or equal to 2^31, return result -2^32
+ *
+ * @path ch09/9.5/S9.5_A2.3_T2.js
+ * @description Use operator ~
+ */
+
+// CHECK#1
+if (~2147483647 !== -2147483648) {
+ $ERROR('#1: ~2147483647 ==== -2147483648)');
+}
+
+// CHECK#2
+if (~2147483648 !== ~-2147483648) {
+ $ERROR('#2: ~2147483648 ==== ~-2147483648)');
+}
+
+// CHECK#3
+if (~2147483649 !== ~-2147483647) {
+ $ERROR('#3: ~2147483649 ==== ~-2147483647)');
+}
+
+// CHECK#4
+if (~4294967295 !== ~-1) {
+ $ERROR('#4: ~4294967295 ==== ~-1)');
+}
+
+// CHECK#5
+if (~4294967296 !== ~0) {
+ $ERROR('#5: ~4294967296 ==== ~0)');
+}
+
+// CHECK#6
+if (~4294967297 !== ~1) {
+ $ERROR('#6: ~4294967297 ==== ~1)');
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T1.js b/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T1.js
new file mode 100644
index 000000000..ea9cc2048
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_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.
+
+/**
+ * Operator uses ToNumber
+ *
+ * @path ch09/9.5/S9.5_A3.1_T1.js
+ * @description Type(x) is Boolean
+ */
+
+// CHECK#1
+if ((new Boolean(true) << 0) !== 1) {
+ $ERROR('#1: (new Boolean(true) << 0) === 1. Actual: ' + ((new Boolean(true) << 0)));
+}
+
+// CHECK#2
+if ((false << 0) !== 0) {
+ $ERROR('#2: (false << 0) === 0. Actual: ' + ((false << 0)));
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T2.js b/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T2.js
new file mode 100644
index 000000000..0a8769ba8
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_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.
+
+/**
+ * Operator uses ToNumber
+ *
+ * @path ch09/9.5/S9.5_A3.1_T2.js
+ * @description Type(x) is Number
+ */
+
+// CHECK#1
+if ((new Number(1) << 0) !== 1) {
+ $ERROR('#1: (new Number(1) << 0) === 1. Actual: ' + ((new Number(1) << 0)));
+}
+
+// CHECK#2
+if ((-1.234 << 0) !== -1) {
+ $ERROR('#2: (-1.234 << 0) === -1. Actual: ' + ((-1.234 << 0)));
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T3.js b/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T3.js
new file mode 100644
index 000000000..5886b0daf
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_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.
+
+/**
+ * Operator uses ToNumber
+ *
+ * @path ch09/9.5/S9.5_A3.1_T3.js
+ * @description Type(x) is String
+ */
+
+// CHECK#1
+if ((new String(1) << 0) !== 1) {
+ $ERROR('#1: (new String(1) << 0) === 1. Actual: ' + ((new String(1) << 0)));
+}
+
+// CHECK#2
+if (("-1.234" << 0) !== -1) {
+ $ERROR('#2: ("-1.234" << 0) === -1. Actual: ' + (("-1.234" << 0)));
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T4.js b/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T4.js
new file mode 100644
index 000000000..a4a701fc5
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A3.1_T4.js
@@ -0,0 +1,79 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * Operator uses ToNumber
+ *
+ * @path ch09/9.5/S9.5_A3.1_T4.js
+ * @description Type(x) is Object
+ */
+
+//CHECK#1
+var object = {valueOf: function() {return 1}};
+if (~object !== ~1) {
+ $ERROR('#1: var object = {valueOf: function() {return 1}}; ~object === ~1');
+}
+
+//CHECK#2
+var object = {valueOf: function() {return 1}, toString: function() {return 0}};
+if (~object !== ~1) {
+ $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; ~object === ~1');
+}
+
+//CHECK#3
+var object = {valueOf: function() {return 1}, toString: function() {return {}}};
+if (~object !== ~1) {
+ $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; ~object === ~1');
+}
+
+//CHECK#4
+try {
+ var object = {valueOf: function() {return 1}, toString: function() {throw "error"}};
+ if (~object !== ~1) {
+ $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; ~object === ~1');
+ }
+}
+catch (e) {
+ if (e === ~"error") {
+ $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; ~object not throw "error"');
+ } else {
+ $ERROR('#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 (~object !== ~1) {
+ $ERROR('#5: var object = {toString: function() {return 1}}; ~object === ~1');
+}
+
+//CHECK#6
+var object = {valueOf: function() {return {}}, toString: function() {return 1}}
+if (~object !== ~1) {
+ $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; ~object === ~1');
+}
+
+//CHECK#7
+try {
+ var object = {valueOf: function() {throw "error"}, toString: function() {return 1}};
+ ~object;
+ $ERROR('#7.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; ~object throw "error". Actual: ' + (~object));
+}
+catch (e) {
+ if (e !== "error") {
+ $ERROR('#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;
+ $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ~object throw TypeError. Actual: ' + (~object));
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ~object throw TypeError. Actual: ' + (e));
+ }
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A3.2_T1.js b/js/src/tests/test262/ch09/9.5/S9.5_A3.2_T1.js
new file mode 100644
index 000000000..6a53855b4
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A3.2_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.
+
+/**
+ * Operator uses floor, abs
+ *
+ * @path ch09/9.5/S9.5_A3.2_T1.js
+ * @description Use operator <<0
+ */
+
+// CHECK#1
+if ((1.2345 << 0) !== 1) {
+ $ERROR('#1: (1.2345 << 0) === 1. Actual: ' + ((1.2345 << 0)));
+}
+
+// CHECK#2
+if ((-5.4321 << 0) !== -5) {
+ $ERROR('#2: (-5.4321 << 0) === -5. Actual: ' + ((-5.4321 << 0)));
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/S9.5_A3.2_T2.js b/js/src/tests/test262/ch09/9.5/S9.5_A3.2_T2.js
new file mode 100644
index 000000000..47838f6a1
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/S9.5_A3.2_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.
+
+/**
+ * Operator uses floor, abs
+ *
+ * @path ch09/9.5/S9.5_A3.2_T2.js
+ * @description Use operator ~
+ */
+
+// CHECK#1
+if (~1.2345 !== ~1) {
+ $ERROR('#1: ~1.2345 === ~1)');
+}
+
+// CHECK#2
+if (~-5.4321 !== ~-5) {
+ $ERROR('#2: ~-5.4321 === ~-5)');
+}
+
diff --git a/js/src/tests/test262/ch09/9.5/browser.js b/js/src/tests/test262/ch09/9.5/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/browser.js
diff --git a/js/src/tests/test262/ch09/9.5/shell.js b/js/src/tests/test262/ch09/9.5/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch09/9.5/shell.js