summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-bigint.js
blob: be72a576c26d3458dcd388632b303f86253b0611 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (C) 2017 Igalia, S. L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-object.prototype.tostring
description: BigInt.prototype[@@toStringTag] is BigInt
info: |
    Let tag be ? Get(O, @@toStringTag).
features: [BigInt]
---*/
assert.sameValue(Object.prototype.toString.call(3n), "[object BigInt]");
assert.sameValue(Object.prototype.toString.call(Object(3n)), "[object BigInt]");
assert.sameValue(Object.prototype.toString.call(BigInt(3n)), "[object BigInt]");
assert.sameValue(Object.prototype.toString.call(Object(BigInt(3n))), "[object BigInt]");

reportCompare(0, 0);