mirror of https://github.com/tc39/test262.git
Temporal: Add missing Number checks in overflow-wrong-type.js.
This commit is contained in:
parent
b458b9f0c2
commit
8123e8fc34
|
@ -44,6 +44,7 @@ assert.throws(RangeError, () => Temporal.PlainDateTime.from(propertyBag, { overf
|
|||
assert.throws(RangeError, () => Temporal.PlainDateTime.from(propertyBag, { overflow: true }), "true");
|
||||
assert.throws(RangeError, () => Temporal.PlainDateTime.from(propertyBag, { overflow: false }), "false");
|
||||
assert.throws(TypeError, () => Temporal.PlainDateTime.from(propertyBag, { overflow: Symbol() }), "symbol");
|
||||
assert.throws(RangeError, () => Temporal.PlainDateTime.from(propertyBag, { overflow: 2 }), "number");
|
||||
assert.throws(RangeError, () => Temporal.PlainDateTime.from(propertyBag, { overflow: 2n }), "bigint");
|
||||
assert.throws(RangeError, () => Temporal.PlainDateTime.from(propertyBag, { overflow: {} }), "plain object");
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ assert.throws(RangeError, () => datetime.with({ minute: 45 }, { overflow: null }
|
|||
assert.throws(RangeError, () => datetime.with({ minute: 45 }, { overflow: true }), "true");
|
||||
assert.throws(RangeError, () => datetime.with({ minute: 45 }, { overflow: false }), "false");
|
||||
assert.throws(TypeError, () => datetime.with({ minute: 45 }, { overflow: Symbol() }), "symbol");
|
||||
assert.throws(RangeError, () => datetime.with({ minute: 45 }, { overflow: 2 }), "number");
|
||||
assert.throws(RangeError, () => datetime.with({ minute: 45 }, { overflow: 2n }), "bigint");
|
||||
assert.throws(RangeError, () => datetime.with({ minute: 45 }, { overflow: {} }), "plain object");
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ assert.throws(RangeError, () => yearmonth.add(duration, { overflow: null }), "nu
|
|||
assert.throws(RangeError, () => yearmonth.add(duration, { overflow: true }), "true");
|
||||
assert.throws(RangeError, () => yearmonth.add(duration, { overflow: false }), "false");
|
||||
assert.throws(TypeError, () => yearmonth.add(duration, { overflow: Symbol() }), "symbol");
|
||||
assert.throws(RangeError, () => yearmonth.add(duration, { overflow: 2 }), "bigint");
|
||||
assert.throws(RangeError, () => yearmonth.add(duration, { overflow: 2 }), "number");
|
||||
assert.throws(RangeError, () => yearmonth.add(duration, { overflow: 2n }), "bigint");
|
||||
assert.throws(RangeError, () => yearmonth.add(duration, { overflow: {} }), "plain object");
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ assert.throws(RangeError, () => yearmonth.subtract(duration, { overflow: null })
|
|||
assert.throws(RangeError, () => yearmonth.subtract(duration, { overflow: true }), "true");
|
||||
assert.throws(RangeError, () => yearmonth.subtract(duration, { overflow: false }), "false");
|
||||
assert.throws(TypeError, () => yearmonth.subtract(duration, { overflow: Symbol() }), "symbol");
|
||||
assert.throws(RangeError, () => yearmonth.subtract(duration, { overflow: 2 }), "bigint");
|
||||
assert.throws(RangeError, () => yearmonth.subtract(duration, { overflow: 2 }), "number");
|
||||
assert.throws(RangeError, () => yearmonth.subtract(duration, { overflow: 2n }), "bigint");
|
||||
assert.throws(RangeError, () => yearmonth.subtract(duration, { overflow: {} }), "plain object");
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ assert.throws(RangeError, () => Temporal.ZonedDateTime.from(propertyBag, { overf
|
|||
assert.throws(RangeError, () => Temporal.ZonedDateTime.from(propertyBag, { overflow: false }), "false");
|
||||
assert.throws(TypeError, () => Temporal.ZonedDateTime.from(propertyBag, { overflow: Symbol() }), "symbol");
|
||||
assert.throws(RangeError, () => Temporal.ZonedDateTime.from(propertyBag, { overflow: 2n }), "bigint");
|
||||
assert.throws(RangeError, () => Temporal.ZonedDateTime.from(propertyBag, { overflow: 2 }), "number");
|
||||
assert.throws(RangeError, () => Temporal.ZonedDateTime.from(propertyBag, { overflow: {} }), "plain object");
|
||||
|
||||
// toString property is read once by Calendar.dateFromFields() in the builtin
|
||||
|
|
|
@ -27,6 +27,7 @@ assert.throws(RangeError, () => datetime.with({ second: 41 }, { overflow: null }
|
|||
assert.throws(RangeError, () => datetime.with({ second: 41 }, { overflow: true }), "true");
|
||||
assert.throws(RangeError, () => datetime.with({ second: 41 }, { overflow: false }), "false");
|
||||
assert.throws(TypeError, () => datetime.with({ second: 41 }, { overflow: Symbol() }), "symbol");
|
||||
assert.throws(RangeError, () => datetime.with({ second: 41 }, { overflow: 2 }), "number");
|
||||
assert.throws(RangeError, () => datetime.with({ second: 41 }, { overflow: 2n }), "bigint");
|
||||
assert.throws(RangeError, () => datetime.with({ second: 41 }, { overflow: {} }), "plain object");
|
||||
|
||||
|
|
Loading…
Reference in New Issue