mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Test limits in PlainYearMonth constructor.
This commit is contained in:
parent
516f9a9083
commit
f857cf9968
20
test/built-ins/Temporal/PlainYearMonth/limits.js
Normal file
20
test/built-ins/Temporal/PlainYearMonth/limits.js
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plainyearmonth
|
||||
description: Limits for the PlainYearMonth constructor.
|
||||
includes: [temporalHelpers.js]
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
assert.throws(RangeError, () => new Temporal.PlainYearMonth(-271821, 3), "min");
|
||||
assert.throws(RangeError, () => new Temporal.PlainYearMonth(275760, 10), "max");
|
||||
TemporalHelpers.assertPlainYearMonth(new Temporal.PlainYearMonth(-271821, 4),
|
||||
-271821, 4, "M04", "min");
|
||||
TemporalHelpers.assertPlainYearMonth(new Temporal.PlainYearMonth(-271821, 4, "iso8601", 18),
|
||||
-271821, 4, "M04", "min with referenceISODay");
|
||||
TemporalHelpers.assertPlainYearMonth(new Temporal.PlainYearMonth(275760, 9),
|
||||
275760, 9, "M09", "max");
|
||||
TemporalHelpers.assertPlainYearMonth(new Temporal.PlainYearMonth(275760, 9, "iso8601", 14),
|
||||
275760, 9, "M09", "max with referenceISODay");
|
Loading…
x
Reference in New Issue
Block a user