From 6e836cea56aaa74e630f2cd8a81ae09ab71fa07f Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 30 Nov 2018 11:34:13 -0500 Subject: [PATCH] Eliminate false positives: BigInt --- test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js | 3 ++- test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js | 3 ++- test/built-ins/BigInt/asIntN/bits-toindex-errors.js | 2 ++ test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js | 2 ++ test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js | 2 ++ test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js | 2 ++ test/built-ins/BigInt/asUintN/bits-toindex-errors.js | 2 ++ test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js | 2 ++ test/built-ins/BigInt/new-target-throws.js | 1 + test/built-ins/BigInt/prototype/toString/prototype-call.js | 1 + .../prototype/toString/thisbigintvalue-not-valid-throws.js | 2 ++ .../prototype/valueOf/this-value-invalid-object-throws.js | 1 + .../prototype/valueOf/this-value-invalid-primitive-throws.js | 2 ++ 13 files changed, 23 insertions(+), 2 deletions(-) diff --git a/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js b/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js index 950cda9f6e..949f74a98c 100644 --- a/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js +++ b/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js @@ -9,7 +9,8 @@ info: | 2. Let bigint ? ToBigInt(bigint). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ - +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asIntN, 'function'); assert.throws(TypeError, function() { BigInt.asIntN(0, undefined); }, "ToBigInt: undefined => TypeError"); diff --git a/test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js b/test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js index fe0a702faf..d1286832e5 100644 --- a/test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js +++ b/test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js @@ -9,7 +9,8 @@ info: | 2. Let bigint ? ToBigInt(bigint). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ - +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asIntN, 'function'); function err() { throw new Test262Error(); } diff --git a/test/built-ins/BigInt/asIntN/bits-toindex-errors.js b/test/built-ins/BigInt/asIntN/bits-toindex-errors.js index 9f2fabb1c1..b0999053ed 100644 --- a/test/built-ins/BigInt/asIntN/bits-toindex-errors.js +++ b/test/built-ins/BigInt/asIntN/bits-toindex-errors.js @@ -9,6 +9,8 @@ info: | 1. Let bits be ? ToIndex(bits). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asIntN, 'function'); assert.throws(RangeError, function() { BigInt.asIntN(-1, 0n); diff --git a/test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js b/test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js index 10ffd610f8..584f461669 100644 --- a/test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js +++ b/test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js @@ -9,6 +9,8 @@ info: | 1. Let bits be ? ToIndex(bits). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asIntN, 'function'); function err() { throw new Test262Error(); diff --git a/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js b/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js index 924e3decb1..d12d665f2d 100644 --- a/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js +++ b/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js @@ -9,6 +9,8 @@ info: | 2. Let bigint ? ToBigInt(bigint). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asUintN, 'function'); assert.throws(TypeError, function() { BigInt.asUintN(0, undefined); diff --git a/test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js b/test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js index 1aff2080c3..e1508cf16f 100644 --- a/test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js +++ b/test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js @@ -9,6 +9,8 @@ info: | 2. Let bigint ? ToBigInt(bigint). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asUintN, 'function'); function err() { throw new Test262Error(); diff --git a/test/built-ins/BigInt/asUintN/bits-toindex-errors.js b/test/built-ins/BigInt/asUintN/bits-toindex-errors.js index 3967dab25d..4bc2553271 100644 --- a/test/built-ins/BigInt/asUintN/bits-toindex-errors.js +++ b/test/built-ins/BigInt/asUintN/bits-toindex-errors.js @@ -9,6 +9,8 @@ info: | 1. Let bits be ? ToIndex(bits). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asUintN, 'function'); assert.throws(RangeError, function() { BigInt.asUintN(-1, 0n); diff --git a/test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js b/test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js index 4933da2fbf..a7499c9d80 100644 --- a/test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js +++ b/test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js @@ -9,6 +9,8 @@ info: | 1. Let bits be ? ToIndex(bits). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asUintN, 'function'); function err() { throw new Test262Error(); diff --git a/test/built-ins/BigInt/new-target-throws.js b/test/built-ins/BigInt/new-target-throws.js index aaf91b1174..c61ef6e2b2 100644 --- a/test/built-ins/BigInt/new-target-throws.js +++ b/test/built-ins/BigInt/new-target-throws.js @@ -9,6 +9,7 @@ info: | ... features: [BigInt] ---*/ +assert.sameValue(typeof BigInt, 'function'); assert.throws(TypeError, function() { new BigInt(); diff --git a/test/built-ins/BigInt/prototype/toString/prototype-call.js b/test/built-ins/BigInt/prototype/toString/prototype-call.js index 76aa2195de..b9a4d0ad70 100644 --- a/test/built-ins/BigInt/prototype/toString/prototype-call.js +++ b/test/built-ins/BigInt/prototype/toString/prototype-call.js @@ -15,6 +15,7 @@ info: | [[BigIntData]] internal slot. features: [BigInt] ---*/ +assert.sameValue(typeof BigInt, 'function'); assert.throws(TypeError, function() { BigInt.prototype.toString(1); diff --git a/test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js b/test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js index 1e4a1bd6b2..2ac6dde7dc 100644 --- a/test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js +++ b/test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js @@ -21,6 +21,8 @@ features: [BigInt, Symbol, Symbol.toPrimitive] var toString = BigInt.prototype.toString; +assert.sameValue(typeof toString, 'function'); + assert.throws(TypeError, function() { toString.call({ x: 1n diff --git a/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js b/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js index 90c5b71c18..88f9f40b62 100644 --- a/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js +++ b/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js @@ -20,6 +20,7 @@ features: [BigInt] ---*/ var valueOf = BigInt.prototype.valueOf; +assert.sameValue(typeof valueOf, 'function'); assert.throws(TypeError, function() { valueOf.call({}); diff --git a/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js b/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js index c7379385c7..9d2a1e13ed 100644 --- a/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js +++ b/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js @@ -21,6 +21,8 @@ features: [BigInt, Symbol] var valueOf = BigInt.prototype.valueOf; +assert.sameValue(typeof valueOf, 'function'); + assert.throws(TypeError, function() { valueOf.call(undefined); }, "undefined");