BigInt: NewTarget tests shouldn't include anything reaches step 2

This commit is contained in:
Rick Waldron 2017-10-18 17:07:33 -04:00
parent 99ee383d3f
commit e2e534b210
1 changed files with 0 additions and 8 deletions

View File

@ -6,7 +6,6 @@ description: Throws a TypeError if BigInt is called with a new target
esid: sec-bigint-constructor esid: sec-bigint-constructor
info: | info: |
1. If NewTarget is not undefined, throw a TypeError exception. 1. If NewTarget is not undefined, throw a TypeError exception.
2. Let prim be ? ToPrimitive(value, hint Number).
... ...
features: [BigInt] features: [BigInt]
---*/ ---*/
@ -24,10 +23,3 @@ assert.throws(TypeError, function() {
valueOf: function() { throw new Test262Error("unreachable"); } valueOf: function() { throw new Test262Error("unreachable"); }
}); });
}); });
for (let x of [NaN, Infinity, 0.5, 2**53]) {
assert.throws(RangeError, () => BigInt(x));
assert.throws(RangeError, () => BigInt(-x));
}
assert.sameValue(BigInt(9007199254740991), 9007199254740991n);
assert.sameValue(BigInt(-9007199254740991), -9007199254740991n);