Temporal: Remove subsumed intl402 custom Calendar/TimeZone tests

This commit is contained in:
Richard Gibson 2023-01-17 14:36:31 -05:00 committed by Philip Chimento
parent ea10ca0cc6
commit 8700c92095
4 changed files with 0 additions and 108 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);