diff --git a/test/built-ins/BigInt/prototype/toString/default-radix.js b/test/built-ins/BigInt/prototype/toString/default-radix.js new file mode 100644 index 0000000000000000000000000000000000000000..edcab3c8cad8115ea17e2587f9244a62b2a229ab --- /dev/null +++ b/test/built-ins/BigInt/prototype/toString/default-radix.js @@ -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'");