mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 23:44:27 +02:00
Eliminate false positives: BigInt
This commit is contained in:
parent
d98f3f4d63
commit
6e836cea56
@ -9,7 +9,8 @@ info: |
|
|||||||
2. Let bigint ? ToBigInt(bigint).
|
2. Let bigint ? ToBigInt(bigint).
|
||||||
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
assert.sameValue(typeof BigInt.asIntN, 'function');
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
BigInt.asIntN(0, undefined);
|
BigInt.asIntN(0, undefined);
|
||||||
}, "ToBigInt: undefined => TypeError");
|
}, "ToBigInt: undefined => TypeError");
|
||||||
|
@ -9,7 +9,8 @@ info: |
|
|||||||
2. Let bigint ? ToBigInt(bigint).
|
2. Let bigint ? ToBigInt(bigint).
|
||||||
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
assert.sameValue(typeof BigInt.asIntN, 'function');
|
||||||
function err() {
|
function err() {
|
||||||
throw new Test262Error();
|
throw new Test262Error();
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,8 @@ info: |
|
|||||||
1. Let bits be ? ToIndex(bits).
|
1. Let bits be ? ToIndex(bits).
|
||||||
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
assert.sameValue(typeof BigInt.asIntN, 'function');
|
||||||
|
|
||||||
assert.throws(RangeError, function() {
|
assert.throws(RangeError, function() {
|
||||||
BigInt.asIntN(-1, 0n);
|
BigInt.asIntN(-1, 0n);
|
||||||
|
@ -9,6 +9,8 @@ info: |
|
|||||||
1. Let bits be ? ToIndex(bits).
|
1. Let bits be ? ToIndex(bits).
|
||||||
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
assert.sameValue(typeof BigInt.asIntN, 'function');
|
||||||
|
|
||||||
function err() {
|
function err() {
|
||||||
throw new Test262Error();
|
throw new Test262Error();
|
||||||
|
@ -9,6 +9,8 @@ info: |
|
|||||||
2. Let bigint ? ToBigInt(bigint).
|
2. Let bigint ? ToBigInt(bigint).
|
||||||
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
assert.sameValue(typeof BigInt.asUintN, 'function');
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
BigInt.asUintN(0, undefined);
|
BigInt.asUintN(0, undefined);
|
||||||
|
@ -9,6 +9,8 @@ info: |
|
|||||||
2. Let bigint ? ToBigInt(bigint).
|
2. Let bigint ? ToBigInt(bigint).
|
||||||
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
assert.sameValue(typeof BigInt.asUintN, 'function');
|
||||||
|
|
||||||
function err() {
|
function err() {
|
||||||
throw new Test262Error();
|
throw new Test262Error();
|
||||||
|
@ -9,6 +9,8 @@ info: |
|
|||||||
1. Let bits be ? ToIndex(bits).
|
1. Let bits be ? ToIndex(bits).
|
||||||
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
assert.sameValue(typeof BigInt.asUintN, 'function');
|
||||||
|
|
||||||
assert.throws(RangeError, function() {
|
assert.throws(RangeError, function() {
|
||||||
BigInt.asUintN(-1, 0n);
|
BigInt.asUintN(-1, 0n);
|
||||||
|
@ -9,6 +9,8 @@ info: |
|
|||||||
1. Let bits be ? ToIndex(bits).
|
1. Let bits be ? ToIndex(bits).
|
||||||
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
assert.sameValue(typeof BigInt.asUintN, 'function');
|
||||||
|
|
||||||
function err() {
|
function err() {
|
||||||
throw new Test262Error();
|
throw new Test262Error();
|
||||||
|
@ -9,6 +9,7 @@ info: |
|
|||||||
...
|
...
|
||||||
features: [BigInt]
|
features: [BigInt]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
new BigInt();
|
new BigInt();
|
||||||
|
@ -15,6 +15,7 @@ info: |
|
|||||||
[[BigIntData]] internal slot.
|
[[BigIntData]] internal slot.
|
||||||
features: [BigInt]
|
features: [BigInt]
|
||||||
---*/
|
---*/
|
||||||
|
assert.sameValue(typeof BigInt, 'function');
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
BigInt.prototype.toString(1);
|
BigInt.prototype.toString(1);
|
||||||
|
@ -21,6 +21,8 @@ features: [BigInt, Symbol, Symbol.toPrimitive]
|
|||||||
|
|
||||||
var toString = BigInt.prototype.toString;
|
var toString = BigInt.prototype.toString;
|
||||||
|
|
||||||
|
assert.sameValue(typeof toString, 'function');
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
toString.call({
|
toString.call({
|
||||||
x: 1n
|
x: 1n
|
||||||
|
@ -20,6 +20,7 @@ features: [BigInt]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
var valueOf = BigInt.prototype.valueOf;
|
var valueOf = BigInt.prototype.valueOf;
|
||||||
|
assert.sameValue(typeof valueOf, 'function');
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
valueOf.call({});
|
valueOf.call({});
|
||||||
|
@ -21,6 +21,8 @@ features: [BigInt, Symbol]
|
|||||||
|
|
||||||
var valueOf = BigInt.prototype.valueOf;
|
var valueOf = BigInt.prototype.valueOf;
|
||||||
|
|
||||||
|
assert.sameValue(typeof valueOf, 'function');
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
valueOf.call(undefined);
|
valueOf.call(undefined);
|
||||||
}, "undefined");
|
}, "undefined");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user