diff --git a/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js b/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js index 949f74a98c..8c9cd6714a 100644 --- a/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js +++ b/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js @@ -11,6 +11,14 @@ 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(); +}, "ToBigInt: no argument => undefined => TypeError"); +assert.throws(TypeError, function () { + BigInt.asIntN(0); +}, "ToBigInt: no argument => undefined => TypeError"); + assert.throws(TypeError, function() { BigInt.asIntN(0, undefined); }, "ToBigInt: undefined => TypeError"); diff --git a/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js b/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js index d12d665f2d..a5e2e35a9d 100644 --- a/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js +++ b/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js @@ -12,6 +12,13 @@ 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(); +}, "ToBigInt: no argument => undefined => TypeError"); +assert.throws(TypeError, function () { + BigInt.asUintN(0); +}, "ToBigInt: no argument => undefined => TypeError"); + assert.throws(TypeError, function() { BigInt.asUintN(0, undefined); }, "ToBigInt: undefined => TypeError");