mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 21:45:04 +02:00
Temporal: Fix PlainDateTime construct args
I discovered these tests had omitted some arguments to the PlainDateTime constructor, leaving the calendar in the wrong position. The tests were technically not incorrect, since the operation ToIntegerThrowOnInfinity on the string "gregory" gives 0. But they could spuriously pass if the implementation didn't do argument conversion correctly, failed to throw on eraYear being ±Infinity, but subsequently threw RangeError anyway because the calendars of the arguments didn't match.
This commit is contained in:
parent
ade328d530
commit
85373b4ce1
@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const other = new Temporal.PlainDateTime(2000, 5, 2, 15, "gregory");
|
const other = new Temporal.PlainDateTime(2000, 5, 2, 15, 0, 0, 0, 0, 0, "gregory");
|
||||||
const base = { era: "ad", month: 5, day: 2, hour: 15, calendar: "gregory" };
|
const base = { era: "ad", month: 5, day: 2, hour: 15, calendar: "gregory" };
|
||||||
|
|
||||||
[Infinity, -Infinity].forEach((inf) => {
|
[Infinity, -Infinity].forEach((inf) => {
|
||||||
|
@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(2000, 5, 2, 15, "gregory");
|
const instance = new Temporal.PlainDateTime(2000, 5, 2, 15, 0, 0, 0, 0, 0, "gregory");
|
||||||
const base = { era: "ad", month: 5, day: 2, hour: 15, calendar: "gregory" };
|
const base = { era: "ad", month: 5, day: 2, hour: 15, calendar: "gregory" };
|
||||||
|
|
||||||
[Infinity, -Infinity].forEach((inf) => {
|
[Infinity, -Infinity].forEach((inf) => {
|
||||||
|
@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(2000, 5, 2, 15, "gregory");
|
const instance = new Temporal.PlainDateTime(2000, 5, 2, 15, 0, 0, 0, 0, 0, "gregory");
|
||||||
const base = { era: "ad", month: 5, day: 2, hour: 15, calendar: "gregory" };
|
const base = { era: "ad", month: 5, day: 2, hour: 15, calendar: "gregory" };
|
||||||
|
|
||||||
[Infinity, -Infinity].forEach((inf) => {
|
[Infinity, -Infinity].forEach((inf) => {
|
||||||
|
@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(2000, 5, 2, 15, "gregory");
|
const instance = new Temporal.PlainDateTime(2000, 5, 2, 15, 0, 0, 0, 0, 0, "gregory");
|
||||||
const base = { era: "ad", month: 5, day: 2, hour: 15, calendar: "gregory" };
|
const base = { era: "ad", month: 5, day: 2, hour: 15, calendar: "gregory" };
|
||||||
|
|
||||||
[Infinity, -Infinity].forEach((inf) => {
|
[Infinity, -Infinity].forEach((inf) => {
|
||||||
|
@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(2000, 5, 2, 15, "gregory");
|
const instance = new Temporal.PlainDateTime(2000, 5, 2, 15, 0, 0, 0, 0, 0, "gregory");
|
||||||
const base = { era: "ad", month: 5, day: 2, calendar: "gregory" };
|
const base = { era: "ad", month: 5, day: 2, calendar: "gregory" };
|
||||||
|
|
||||||
[Infinity, -Infinity].forEach((inf) => {
|
[Infinity, -Infinity].forEach((inf) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user