summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/strict-does-not-equals/bigint-and-boolean.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/expressions/strict-does-not-equals/bigint-and-boolean.js')
-rw-r--r--js/src/tests/test262/language/expressions/strict-does-not-equals/bigint-and-boolean.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/strict-does-not-equals/bigint-and-boolean.js b/js/src/tests/test262/language/expressions/strict-does-not-equals/bigint-and-boolean.js
new file mode 100644
index 0000000000..ff251f8e5d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/strict-does-not-equals/bigint-and-boolean.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2017 Josh Wolfe. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: Strict inequality comparison of BigInt and Boolean values
+esid: sec-strict-equality-comparison
+info: |
+ 1. If Type(x) is different from Type(y), return false.
+
+features: [BigInt]
+---*/
+assert.sameValue(-1n !== false, true, 'The result of (-1n !== false) is true');
+assert.sameValue(false !== -1n, true, 'The result of (false !== -1n) is true');
+assert.sameValue(-1n !== true, true, 'The result of (-1n !== true) is true');
+assert.sameValue(true !== -1n, true, 'The result of (true !== -1n) is true');
+assert.sameValue(0n !== false, true, 'The result of (0n !== false) is true');
+assert.sameValue(false !== 0n, true, 'The result of (false !== 0n) is true');
+assert.sameValue(0n !== true, true, 'The result of (0n !== true) is true');
+assert.sameValue(true !== 0n, true, 'The result of (true !== 0n) is true');
+assert.sameValue(1n !== false, true, 'The result of (1n !== false) is true');
+assert.sameValue(false !== 1n, true, 'The result of (false !== 1n) is true');
+assert.sameValue(1n !== true, true, 'The result of (1n !== true) is true');
+assert.sameValue(true !== 1n, true, 'The result of (true !== 1n) is true');
+assert.sameValue(2n !== false, true, 'The result of (2n !== false) is true');
+assert.sameValue(false !== 2n, true, 'The result of (false !== 2n) is true');
+assert.sameValue(2n !== true, true, 'The result of (2n !== true) is true');
+assert.sameValue(true !== 2n, true, 'The result of (true !== 2n) is true');
+
+reportCompare(0, 0);