mirror of https://github.com/tc39/test262.git
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]
|
||||
---*/
|
||||
|
||||
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) => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue