1
0
mirror of https://github.com/tc39/test262.git synced 2025-04-08 19:35:28 +02:00

Temporal: Fix argument-propertybag-calendar-number testing the wrong methods

Due to overlooked copy-paste errors we were creating the wrong type of
instance in these tests, and therefore testing the wrong method.

(Add blank line for consistency with the other instances of these tests.)
This commit is contained in:
Philip Chimento 2024-03-18 16:59:54 -07:00 committed by Ms2ger
parent d7aec8e178
commit 0cb219ffe0
7 changed files with 14 additions and 7 deletions

@ -7,7 +7,7 @@ description: A number as calendar in a property bag is not accepted
features: [Temporal]
---*/
const instance = new Temporal.PlainDate(1976, 11, 18);
const instance = new Temporal.Calendar("iso8601");
const numbers = [
1,
@ -15,6 +15,7 @@ const numbers = [
-19970327,
1234567890,
];
for (const calendar of numbers) {
const arg = { year: 1976, monthCode: "M11", day: 18, calendar };
assert.throws(

@ -7,7 +7,7 @@ description: A number as calendar in a property bag is not accepted
features: [Temporal]
---*/
const instance = new Temporal.PlainDate(1976, 11, 18);
const instance = new Temporal.PlainDateTime(1976, 11, 18);
const numbers = [
1,
@ -15,6 +15,7 @@ const numbers = [
-19970327,
1234567890,
];
for (const calendar of numbers) {
const arg = { year: 1976, monthCode: "M11", day: 18, calendar };
assert.throws(

@ -7,7 +7,7 @@ description: A number as calendar in a property bag is not accepted
features: [Temporal]
---*/
const instance = new Temporal.PlainDate(1976, 11, 18);
const instance = new Temporal.PlainDateTime(1976, 11, 18);
const numbers = [
1,
@ -15,6 +15,7 @@ const numbers = [
-19970327,
1234567890,
];
for (const calendar of numbers) {
const arg = { year: 1976, monthCode: "M11", day: 18, calendar };
assert.throws(

@ -7,7 +7,7 @@ description: A number as calendar in a property bag is not accepted
features: [Temporal]
---*/
const instance = new Temporal.PlainDate(1976, 11, 18);
const instance = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 987, 654, 321);
const numbers = [
1,
@ -15,6 +15,7 @@ const numbers = [
-19970327,
1234567890,
];
for (const calendar of numbers) {
const arg = { year: 1976, monthCode: "M11", day: 18, calendar };
assert.throws(

@ -7,7 +7,7 @@ description: A number as calendar in a property bag is not accepted
features: [Temporal]
---*/
const instance = new Temporal.PlainDate(1976, 11, 18);
const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321);
const numbers = [
1,
@ -15,6 +15,7 @@ const numbers = [
-19970327,
1234567890,
];
for (const calendar of numbers) {
const arg = { year: 1976, monthCode: "M11", day: 18, calendar };
assert.throws(

@ -7,7 +7,7 @@ description: A number as calendar in a property bag is not accepted
features: [Temporal]
---*/
const instance = new Temporal.PlainDate(1976, 11, 18);
const instance = new Temporal.PlainYearMonth(2019, 6);
const numbers = [
1,
@ -15,6 +15,7 @@ const numbers = [
-19970327,
1234567890,
];
for (const calendar of numbers) {
const arg = { year: 2019, monthCode: "M06", calendar };
assert.throws(

@ -7,7 +7,7 @@ description: A number as calendar in a property bag is not accepted
features: [Temporal]
---*/
const instance = new Temporal.PlainDate(1976, 11, 18);
const instance = new Temporal.PlainYearMonth(2019, 6);
const numbers = [
1,
@ -15,6 +15,7 @@ const numbers = [
-19970327,
1234567890,
];
for (const calendar of numbers) {
const arg = { year: 2019, monthCode: "M06", calendar };
assert.throws(