From 8700c9209585766667159bdcb65edea4b823f373 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Tue, 17 Jan 2023 14:36:31 -0500 Subject: [PATCH] Temporal: Remove subsumed intl402 custom Calendar/TimeZone tests --- .../eraYear/calendar-returns-infinity.js | 27 ------------------- .../eraYear/calendar-returns-infinity.js | 27 ------------------- .../eraYear/calendar-returns-infinity.js | 27 ------------------- .../eraYear/calendar-returns-infinity.js | 27 ------------------- 4 files changed, 108 deletions(-) delete mode 100644 test/intl402/Temporal/PlainDate/prototype/eraYear/calendar-returns-infinity.js delete mode 100644 test/intl402/Temporal/PlainDateTime/prototype/eraYear/calendar-returns-infinity.js delete mode 100644 test/intl402/Temporal/PlainYearMonth/prototype/eraYear/calendar-returns-infinity.js delete mode 100644 test/intl402/Temporal/ZonedDateTime/prototype/eraYear/calendar-returns-infinity.js diff --git a/test/intl402/Temporal/PlainDate/prototype/eraYear/calendar-returns-infinity.js b/test/intl402/Temporal/PlainDate/prototype/eraYear/calendar-returns-infinity.js deleted file mode 100644 index cd143556b0..0000000000 --- a/test/intl402/Temporal/PlainDate/prototype/eraYear/calendar-returns-infinity.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2021 Igalia, S.L. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-get-temporal.plaindate.prototype.erayear -description: Getter throws if the calendar returns ±∞ from its eraYear method -features: [Temporal] ----*/ - -class InfinityCalendar extends Temporal.Calendar { - constructor(positive) { - super("iso8601"); - this.positive = positive; - } - - eraYear() { - return this.positive ? Infinity : -Infinity; - } -} - -const pos = new InfinityCalendar(true); -const instance1 = new Temporal.PlainDate(2000, 5, 2, pos); -assert.throws(RangeError, () => instance1.eraYear); - -const neg = new InfinityCalendar(false); -const instance2 = new Temporal.PlainDate(2000, 5, 2, neg); -assert.throws(RangeError, () => instance2.eraYear); diff --git a/test/intl402/Temporal/PlainDateTime/prototype/eraYear/calendar-returns-infinity.js b/test/intl402/Temporal/PlainDateTime/prototype/eraYear/calendar-returns-infinity.js deleted file mode 100644 index 0655d8ee9a..0000000000 --- a/test/intl402/Temporal/PlainDateTime/prototype/eraYear/calendar-returns-infinity.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2021 Igalia, S.L. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-get-temporal.plaindatetime.prototype.erayear -description: Getter throws if the calendar returns ±∞ from its eraYear method -features: [Temporal] ----*/ - -class InfinityCalendar extends Temporal.Calendar { - constructor(positive) { - super("iso8601"); - this.positive = positive; - } - - eraYear() { - return this.positive ? Infinity : -Infinity; - } -} - -const pos = new InfinityCalendar(true); -const instance1 = new Temporal.PlainDateTime(2000, 5, 2, 15, 30, 45, 987, 654, 321, pos); -assert.throws(RangeError, () => instance1.eraYear); - -const neg = new InfinityCalendar(false); -const instance2 = new Temporal.PlainDateTime(2000, 5, 2, 15, 30, 45, 987, 654, 321, neg); -assert.throws(RangeError, () => instance2.eraYear); diff --git a/test/intl402/Temporal/PlainYearMonth/prototype/eraYear/calendar-returns-infinity.js b/test/intl402/Temporal/PlainYearMonth/prototype/eraYear/calendar-returns-infinity.js deleted file mode 100644 index f8b9689115..0000000000 --- a/test/intl402/Temporal/PlainYearMonth/prototype/eraYear/calendar-returns-infinity.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2021 Igalia, S.L. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-get-temporal.plainyearmonth.prototype.erayear -description: Getter throws if the calendar returns ±∞ from its eraYear method -features: [Temporal] ----*/ - -class InfinityCalendar extends Temporal.Calendar { - constructor(positive) { - super("iso8601"); - this.positive = positive; - } - - eraYear() { - return this.positive ? Infinity : -Infinity; - } -} - -const pos = new InfinityCalendar(true); -const instance1 = new Temporal.PlainYearMonth(2000, 5, pos); -assert.throws(RangeError, () => instance1.eraYear); - -const neg = new InfinityCalendar(false); -const instance2 = new Temporal.PlainYearMonth(2000, 5, neg); -assert.throws(RangeError, () => instance2.eraYear); diff --git a/test/intl402/Temporal/ZonedDateTime/prototype/eraYear/calendar-returns-infinity.js b/test/intl402/Temporal/ZonedDateTime/prototype/eraYear/calendar-returns-infinity.js deleted file mode 100644 index b8150c8672..0000000000 --- a/test/intl402/Temporal/ZonedDateTime/prototype/eraYear/calendar-returns-infinity.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2021 Igalia, S.L. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-get-temporal.zoneddatetime.prototype.erayear -description: Getter throws if the calendar returns ±∞ from its eraYear method -features: [Temporal] ----*/ - -class InfinityCalendar extends Temporal.Calendar { - constructor(positive) { - super("iso8601"); - this.positive = positive; - } - - eraYear() { - return this.positive ? Infinity : -Infinity; - } -} - -const pos = new InfinityCalendar(true); -const instance1 = new Temporal.ZonedDateTime(0n, "UTC", pos); -assert.throws(RangeError, () => instance1.eraYear); - -const neg = new InfinityCalendar(false); -const instance2 = new Temporal.ZonedDateTime(0n, "UTC", neg); -assert.throws(RangeError, () => instance2.eraYear);