Merge pull request #1516 from cxielarko/tostring-default-radix

test BigInt toString with default radix
This commit is contained in:
Rick Waldron 2018-04-18 16:21:39 -04:00 committed by GitHub
commit 14931c923f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-bigint.prototype.tostring
description: toString with default radix
features: [BigInt]
---*/
assert.sameValue((-100n).toString(), "-100", "(-100n).toString() === '-100'");
assert.sameValue((0n).toString(), "0", "(0n).toString() === '0'");
assert.sameValue((100n).toString(), "100", "(100n).toString() === '100'");
assert.sameValue((-100n).toString(undefined), "-100",
"(-100n).toString(undefined) === '-100'");
assert.sameValue((0n).toString(undefined), "0",
"(0n).toString(undefined) === '0'");
assert.sameValue((100n).toString(undefined), "100",
"(100n).toString(undefined) === '100'");