Skip to content
Snippets Groups Projects
Unverified Commit c49de8a6 authored by Rick Waldron's avatar Rick Waldron Committed by GitHub
Browse files

Merge pull request #1547 from caiolima/big-int-relational-bool

Added tests of relational comparison among BigInt and boolean
parents 83d81532 5cacfaf6
No related branches found
No related tags found
No related merge requests found
// 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, "0n > false");
assert.sameValue(false > 0n, false, "false > 0n");
assert.sameValue(0n > true, false, "0n > true");
assert.sameValue(true > 0n, true, "true > 0n");
assert.sameValue(1n > false, true, "1n > false");
assert.sameValue(false > 1n, false, "false > 1n");
assert.sameValue(1n > true, false, "1n > true");
assert.sameValue(true > 1n, false, "true > 1n");
assert.sameValue(31n > true, true, "31n > true");
assert.sameValue(true > 31n, false, "true > 31n");
assert.sameValue(-3n > true, false, "-3n > true");
assert.sameValue(true > -3n, true, "true > -3n");
assert.sameValue(-3n > false, false, "-3n > false");
assert.sameValue(false > -3n, true, "false > -3n");
// 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, "0n < false");
assert.sameValue(false < 0n, false, "false < 0n");
assert.sameValue(0n < true, true, "0n < true");
assert.sameValue(true < 0n, false, "true < 0n");
assert.sameValue(1n < false, false, "1n < false");
assert.sameValue(false < 1n, true, "false < 1n");
assert.sameValue(1n < true, false, "1n < true");
assert.sameValue(true < 1n, false, "true < 1n");
assert.sameValue(31n < true, false, "31n < true");
assert.sameValue(true < 31n, true, "true < 31n");
assert.sameValue(-3n < true, true, "-3n < true");
assert.sameValue(true < -3n, false, "true < -3n");
assert.sameValue(-3n < false, true, "-3n < false");
assert.sameValue(false < -3n, false, "false < -3n");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment