mirror of
https://github.com/tc39/test262.git
synced 2025-05-23 16:20:34 +02:00
cross-realm test for BigInt.prototype.valueOf
Thanks to Jeff Walden for suggesting this test case.
This commit is contained in:
parent
08cc5a8f68
commit
5be8900d6b
14
test/built-ins/BigInt/prototype/valueOf/cross-realm.js
vendored
Normal file
14
test/built-ins/BigInt/prototype/valueOf/cross-realm.js
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// 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.valueof
|
||||||
|
description: valueOf called with a BigInt object from another realm
|
||||||
|
features: [BigInt, cross-realm]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var other = $262.createRealm().global;
|
||||||
|
var wrapped = other.Object(other.BigInt(0));
|
||||||
|
|
||||||
|
assert.sameValue(BigInt.prototype.valueOf.call(wrapped), 0n,
|
||||||
|
"cross-realm valueOf");
|
Loading…
x
Reference in New Issue
Block a user