[bigint] Add a test for Bigint.prototype.valueOf.

We can already construct wrapper objects using Object().

R=jkummerow@chromium.org

Bug: v8:6791
Change-Id: Ic4079654ef1fcae2be4b588cb12c2645e199f4f7
Reviewed-on: https://chromium-review.googlesource.com/738089
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48955}
This commit is contained in:
Georg Neis 2017-10-25 11:41:43 +02:00 committed by Commit Bot
parent a74ee93311
commit 9dbea83609

View File

@ -230,8 +230,7 @@ const six = BigInt(6);
assertEquals(Object(zero).valueOf(), another_zero);
assertThrows(() => { return BigInt.prototype.valueOf.call("string"); },
TypeError);
// TODO(jkummerow): Add tests for (new BigInt(...)).valueOf() when we
// can construct BigInt wrappers.
assertEquals(-42n, Object(-42n).valueOf());
}
// ToBoolean