diff --git a/test/built-ins/Temporal/Calendar/prototype/dateAdd/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/dateAdd/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/dateAdd/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/dateAdd/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/dateAdd/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/dateAdd/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..66640fe3bf --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/dateAdd/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.dateadd +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.dateAdd(arg, new Temporal.Duration())); diff --git a/test/built-ins/Temporal/Calendar/prototype/day/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/day/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/day/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/day/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/day/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/day/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..801809482c --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/day/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.day +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.day(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/dayOfWeek/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/dayOfWeek/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..b411625570 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.dayofweek +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.dayOfWeek(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/dayOfYear/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/dayOfYear/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/dayOfYear/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/dayOfYear/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/dayOfYear/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/dayOfYear/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..81fb544505 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/dayOfYear/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.dayofyear +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.dayOfYear(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInMonth/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/daysInMonth/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/daysInMonth/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/daysInMonth/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInMonth/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/daysInMonth/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..db08f3038e --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/daysInMonth/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.daysinmonth +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.daysInMonth(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInWeek/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/daysInWeek/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/daysInWeek/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/daysInWeek/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInWeek/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/daysInWeek/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..aec5f24ffe --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/daysInWeek/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.daysinweek +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.daysInWeek(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInYear/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/daysInYear/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/daysInYear/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/daysInYear/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInYear/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/daysInYear/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..5fa002c949 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/daysInYear/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.daysinyear +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.daysInYear(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/inLeapYear/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/inLeapYear/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/inLeapYear/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/inLeapYear/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/inLeapYear/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/inLeapYear/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..477767c7e1 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/inLeapYear/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.inleapyear +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.inLeapYear(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/month/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/month/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/month/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/month/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/month/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/month/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..fc454a175d --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/month/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.month +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.month(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/monthCode/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/monthCode/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/monthCode/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/monthCode/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/monthCode/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/monthCode/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..5f19824620 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/monthCode/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.monthcode +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.monthCode(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/monthsInYear/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/monthsInYear/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/monthsInYear/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/monthsInYear/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/monthsInYear/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/monthsInYear/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..a5050bb0f2 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/monthsInYear/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.monthsinyear +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.monthsInYear(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/weekOfYear/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/weekOfYear/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/weekOfYear/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/weekOfYear/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/weekOfYear/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/weekOfYear/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..1a09253140 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/weekOfYear/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.weekofyear +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.weekOfYear(arg)); diff --git a/test/built-ins/Temporal/Calendar/prototype/year/leap-second.js b/test/built-ins/Temporal/Calendar/prototype/year/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/Calendar/prototype/year/leap-second.js rename to test/built-ins/Temporal/Calendar/prototype/year/argument-leap-second.js diff --git a/test/built-ins/Temporal/Calendar/prototype/year/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/Calendar/prototype/year/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..1d5119c99e --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/year/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.year +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.year(arg)); diff --git a/test/built-ins/Temporal/Duration/prototype/round/relativeto-zoneddatetime-convert.js b/test/built-ins/Temporal/Duration/prototype/round/relativeto-zoneddatetime-convert.js new file mode 100644 index 0000000000..1113fd34e6 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/round/relativeto-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.duration.prototype.round +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Duration(0, 0, 0, 365); + +assert.throws(Test262Error, () => instance.round({ relativeTo: arg, largestUnit: "years" })); diff --git a/test/built-ins/Temporal/PlainDate/from/leap-second.js b/test/built-ins/Temporal/PlainDate/from/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/PlainDate/from/leap-second.js rename to test/built-ins/Temporal/PlainDate/from/argument-leap-second.js diff --git a/test/built-ins/Temporal/PlainDate/prototype/equals/leap-second.js b/test/built-ins/Temporal/PlainDate/prototype/equals/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/PlainDate/prototype/equals/leap-second.js rename to test/built-ins/Temporal/PlainDate/prototype/equals/argument-leap-second.js diff --git a/test/built-ins/Temporal/PlainDate/prototype/equals/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/PlainDate/prototype/equals/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..2e2b82dc44 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/equals/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.plaindate.prototype.equals +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.PlainDate(1976, 11, 18); + +assert.throws(Test262Error, () => instance.equals(arg)); diff --git a/test/built-ins/Temporal/PlainDate/prototype/since/leap-second.js b/test/built-ins/Temporal/PlainDate/prototype/since/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/PlainDate/prototype/since/leap-second.js rename to test/built-ins/Temporal/PlainDate/prototype/since/argument-leap-second.js diff --git a/test/built-ins/Temporal/PlainDate/prototype/since/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/PlainDate/prototype/since/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..30c2ff30d1 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/since/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.plaindate.prototype.since +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.PlainDate(1976, 11, 18); + +assert.throws(Test262Error, () => instance.since(arg)); diff --git a/test/built-ins/Temporal/PlainDate/prototype/until/leap-second.js b/test/built-ins/Temporal/PlainDate/prototype/until/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/PlainDate/prototype/until/leap-second.js rename to test/built-ins/Temporal/PlainDate/prototype/until/argument-leap-second.js diff --git a/test/built-ins/Temporal/PlainDate/prototype/until/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/PlainDate/prototype/until/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..4aca3ad346 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/until/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.plaindate.prototype.until +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.PlainDate(1976, 11, 18); + +assert.throws(Test262Error, () => instance.until(arg)); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/leap-second.js b/test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/leap-second.js rename to test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/argument-leap-second.js diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..4d2c8ecc8f --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.plaindatetime.prototype.withplaindate +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 987, 654, 321); + +assert.throws(Test262Error, () => instance.withPlainDate(arg)); diff --git a/test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/leap-second.js b/test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/leap-second.js rename to test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/argument-leap-second.js diff --git a/test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..3aad3b6aa4 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.plaintime.prototype.toplaindatetime +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321); + +assert.throws(Test262Error, () => instance.toPlainDateTime(arg)); diff --git a/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/leap-second.js b/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/leap-second.js rename to test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/argument-leap-second.js diff --git a/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..34e609e36c --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.plaintime.prototype.tozoneddatetime +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321); + +assert.throws(Test262Error, () => instance.toZonedDateTime({ plainDate: arg, timeZone: "UTC" })); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/leap-second.js b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/argument-leap-second.js similarity index 100% rename from test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/leap-second.js rename to test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/argument-leap-second.js diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/argument-zoneddatetime-convert.js b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..9b56186bdc --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.zoneddatetime.prototype.withplaindate +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.ZonedDateTime(1_000_000_000_000_000_000n, "UTC"); + +assert.throws(Test262Error, () => instance.withPlainDate(arg)); diff --git a/test/intl402/Temporal/Calendar/prototype/era/leap-second.js b/test/intl402/Temporal/Calendar/prototype/era/argument-leap-second.js similarity index 100% rename from test/intl402/Temporal/Calendar/prototype/era/leap-second.js rename to test/intl402/Temporal/Calendar/prototype/era/argument-leap-second.js diff --git a/test/intl402/Temporal/Calendar/prototype/era/argument-zoneddatetime-convert.js b/test/intl402/Temporal/Calendar/prototype/era/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..107353320e --- /dev/null +++ b/test/intl402/Temporal/Calendar/prototype/era/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.era +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.era(arg)); diff --git a/test/intl402/Temporal/Calendar/prototype/eraYear/leap-second.js b/test/intl402/Temporal/Calendar/prototype/eraYear/argument-leap-second.js similarity index 100% rename from test/intl402/Temporal/Calendar/prototype/eraYear/leap-second.js rename to test/intl402/Temporal/Calendar/prototype/eraYear/argument-leap-second.js diff --git a/test/intl402/Temporal/Calendar/prototype/eraYear/argument-zoneddatetime-convert.js b/test/intl402/Temporal/Calendar/prototype/eraYear/argument-zoneddatetime-convert.js new file mode 100644 index 0000000000..5fad6b7519 --- /dev/null +++ b/test/intl402/Temporal/Calendar/prototype/eraYear/argument-zoneddatetime-convert.js @@ -0,0 +1,19 @@ +// 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.calendar.prototype.erayear +description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated. +features: [Temporal] +---*/ + +class TZ extends Temporal.TimeZone { + constructor() { super("UTC") } + getOffsetNanosecondsFor() { throw new Test262Error() } +} + +const tz = new TZ(); +const arg = new Temporal.ZonedDateTime(0n, tz); +const instance = new Temporal.Calendar("iso8601"); + +assert.throws(Test262Error, () => instance.eraYear(arg));