mirror of
https://github.com/tc39/test262.git
synced 2025-07-16 02:24:38 +02:00
Merge pull request #1516 from cxielarko/tostring-default-radix
test BigInt toString with default radix
This commit is contained in:
commit
14931c923f
19
test/built-ins/BigInt/prototype/toString/default-radix.js
vendored
Normal file
19
test/built-ins/BigInt/prototype/toString/default-radix.js
vendored
Normal 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'");
|
Loading…
x
Reference in New Issue
Block a user