diff options
Diffstat (limited to 'js/src/tests/test262/language/expressions/greater-than/bigint-and-boolean.js')
-rw-r--r-- | js/src/tests/test262/language/expressions/greater-than/bigint-and-boolean.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/greater-than/bigint-and-boolean.js b/js/src/tests/test262/language/expressions/greater-than/bigint-and-boolean.js new file mode 100644 index 0000000000..263b7c2e6d --- /dev/null +++ b/js/src/tests/test262/language/expressions/greater-than/bigint-and-boolean.js @@ -0,0 +1,23 @@ +// Copyright (C) 2018 Caio Lima. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Relational comparison of BigInt and boolean values +esid: sec-abstract-relational-comparison +features: [BigInt] +---*/ +assert.sameValue(0n > false, false, 'The result of (0n > false) is false'); +assert.sameValue(false > 0n, false, 'The result of (false > 0n) is false'); +assert.sameValue(0n > true, false, 'The result of (0n > true) is false'); +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, false, 'The result of (false > 1n) is false'); +assert.sameValue(1n > true, false, 'The result of (1n > true) is false'); +assert.sameValue(true > 1n, false, 'The result of (true > 1n) is false'); +assert.sameValue(31n > true, true, 'The result of (31n > true) is true'); +assert.sameValue(true > 31n, false, 'The result of (true > 31n) is false'); +assert.sameValue(-3n > true, false, 'The result of (-3n > true) is false'); +assert.sameValue(true > -3n, true, 'The result of (true > -3n) is true'); +assert.sameValue(-3n > false, false, 'The result of (-3n > false) is false'); +assert.sameValue(false > -3n, true, 'The result of (false > -3n) is true'); + +reportCompare(0, 0); |