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:
Philip Chimento 2022-10-25 16:55:09 -07:00 committed by Ms2ger
parent ade328d530
commit 85373b4ce1
5 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
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" };
[Infinity, -Infinity].forEach((inf) => {

View File

@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
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" };
[Infinity, -Infinity].forEach((inf) => {

View File

@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
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" };
[Infinity, -Infinity].forEach((inf) => {

View File

@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
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" };
[Infinity, -Infinity].forEach((inf) => {

View File

@ -8,7 +8,7 @@ includes: [compareArray.js, temporalHelpers.js]
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" };
[Infinity, -Infinity].forEach((inf) => {