7451 Commits

Author SHA1 Message Date
André Bargull
334bb5db93 Test that resolved MonthDay can have a different ordinal month
PR #4708 covered the second issue reported in
<https://bugzilla.mozilla.org/show_bug.cgi?id=1999918>. Extend the test
cases to also cover the first issue reported there.
2025-11-27 12:29:20 -08:00
André Bargull
a1f905d440 Update old Temporal tests for CLDR 48
CLDR 48 changed some era names, update the tests accordingly.
2025-11-27 09:06:25 -08:00
Philip Chimento
3102b7c115 Intl Era Monthcode: Difference tests in and across M13 in Orthodox calendars
This adds tests for computing the difference between two dates in the
three Orthodox calendars (coptic, ethioaa, ethiopic) specifically in
and across the epagomenal month (M13).
2025-11-27 16:36:17 +01:00
Philip Chimento
370e082653 Intl Era Monthcode: Constrain day in with() in Orthodox calendars
This adds tests for constraining the day when changing the month code
using the with() method in the three Orthodox calendars (coptic,
ethioaa, ethiopic). Adding years is already covered in the
leap-year-*.js tests. The only time that the days need to be
constrained to the end of the month is in the epagomenal month
(M13), since all the other months always have 30 days.
2025-11-27 16:36:17 +01:00
Philip Chimento
8adac5c382 Intl Era Monthcode: Constrain day in addition in Orthodox calendars
This adds tests for constraining the day when adding months in the three
Orthodox calendars (coptic, ethioaa, ethiopic). Adding years is already
covered in the leap-year-*.js tests. The only time that the days need to
be constrained to the end of the month is in the epagomenal month (M13),
since all the other months always have 30 days.
2025-11-27 16:36:17 +01:00
Philip Chimento
ea453c5629 Intl Era Monthcode: Change year on leap day in Orthodox calendars
Similar to the previous commit, this adds tests for adjusting the year
number using the with() method on leap day (M13-06) and constraining to
M13-05 in common years for the three Orthodox calendars (coptic,
ethioaa, ethiopic).
2025-11-27 16:36:17 +01:00
Philip Chimento
1e819e2f5c Intl Era Monthcode: Addition on leap day in Orthodox calendars
This adds tests for addition and subtraction on leap day (M13-06) and
constraining to M13-05 in common years for the three Orthodox calendars
(coptic, ethioaa, ethiopic).
2025-11-27 16:36:17 +01:00
Tim Chevalier
e7da3e0c83 Fix islamic-umalqura years 2025-11-27 15:22:56 +01:00
Tim Chevalier
856d5f576c Fix Persian years 2025-11-27 15:22:56 +01:00
Tim Chevalier
34b978668b Fix Hijri years 2025-11-27 15:22:56 +01:00
Tim Chevalier
4d511f132f Fix ethioaa years 2025-11-27 15:22:56 +01:00
Tim Chevalier
0432438823 Temporal: Basic date difference tests for most non-ISO calendars
Covers Chinese, Dangi, Orthodox, Hebrew, Indian, Hijri, and Persian
calendars.
2025-11-27 15:22:56 +01:00
André Bargull
b008170b22 Fix strict mode error 2025-11-27 12:07:48 +01:00
Sosuke Suzuki
e23d841cfe Add missing feature: [Temporal] 2025-11-27 12:00:50 +01:00
Tim Chevalier
09208ac612 Intl Era Monthcode: Test constraining day in persian calendar
Tests for year and month arithmetic around constraining the day to the
end of a 30 or 31-day month in leap and common years, in the
Persian calendar, for add(), subtract(), and with().
2025-11-27 11:59:00 +01:00
Philip Chimento
b224646000 Intl Era Monthcode: Constrain day in with() in East Asian calendars
This adds tests for constraining the day when adjusting the year or
months using the with() method in the two East Asian lunisolar
calendars (chinese, dangi). Tests jumping from a long leap month to a
short leap month in another year, jumping from a long month to the same
month in a year where it is short, and jumping from a long month to all
other months in the same year (long or short).
2025-11-27 11:40:11 +01:00
Philip Chimento
e83b69ff13 Intl Era Monthcode: Constrain day in addition in East Asian calendars
This adds tests for constraining the day when adding years and months in
the two East Asian lunisolar calendars (chinese, dangi). Tests jumping
from a long leap month to a short leap month in another year, jumping
from a long month to the same month in a year where it is short, and
jumping from a long month to all other months in the same year (long or
short).
2025-11-27 11:40:11 +01:00
Tim Chevalier
f0c794116d Intl Era Monthcode: Tests for leap years, Persian calendar
Add tests for addition, subtraction, since and until around leap years
in the Persian calendar.
2025-11-27 11:12:55 +01:00
Ben Allen
b07d3ad40f Added tests ensuring yearOfWeek and weekOfYear are undefined when
using non-ISO calendar with `PlainDate`, `PlainDateTime`, and
`ZonedDateTime`
2025-11-26 17:00:29 -08:00
Jesse Alama
76cb0928a8 Add PlainMonthDay month code tests for non-ISO calendars 2025-11-26 16:52:31 -08:00
Tim Chevalier
26c08890ca Temporal: Pre-1582 tests for Gregorian-like calendars
These tests check that the calendar does not skip days from
Gregorian dates 1582-10-04 to 1582-10-14; for the Buddhist calendar,
the tests also check that the calendar does not skip months in Gregorian
year 1941.
2025-11-26 15:39:02 -08:00
Tim Chevalier
9abd522060 Temporal: Add tests for order of operations on property bag reads
Add tests for order of operations on property bag reads for
the following methods:

* PlainDate.prototype.toPlainDateTime
* PlainDateTime.prototype.withPlainTime
* ZonedDateTime.prototype.getTimeZoneTransition
2025-11-26 15:20:06 -08:00
Manish Goregaokar
a23160011e Temporal: Fix reference day in 1987 test 2025-11-26 15:13:26 -08:00
Manish Goregaokar
bc5c6fe5bc
Temporal: Fix more Chinese calendar expectations for 1987 (#4713) 2025-11-26 13:20:58 -08:00
Tim Chevalier
543b94f010 Fix years harder 2025-11-26 12:25:18 -08:00
Tim Chevalier
b5e4c271b9 Fix years again 2025-11-26 12:25:18 -08:00
Tim Chevalier
ecbf09abdd Use more recent years 2025-11-26 12:25:18 -08:00
Tim Chevalier
e84f30785e Basic addition and subtraction tests for Persian calendar 2025-11-26 12:25:18 -08:00
Tim Chevalier
a10aa15148 Basic addition and subtraction tests for Indian calendar 2025-11-26 12:25:18 -08:00
Tim Chevalier
75b3cec5c2 Basic addition and subtraction tests for Orthodox calendars 2025-11-26 12:25:18 -08:00
Philip Chimento
bab1b65126
Intl Era Monthcode: Fix mistaken out-of-range date leftovers from #4667 (#4696) 2025-11-26 19:49:43 +00:00
Philip Chimento
5daa33c32b Intl Era Monthcode: Constrain day to end-of-month, ISO-like calendars
Similar to the previous commit, this adds tests for constraining the day
to the end of the month, but using the with() method. For the four
ISO8601-like calendars (buddhist, gregory, japanese, roc).
2025-11-26 17:40:44 +01:00
Philip Chimento
6d104f134e Intl Era Monthcode: Add months to end-of-month days, ISO-like calendars
This adds tests similar to the ISO8601 calendar ones in test/built-ins/
for constraining the day to the end of the month when adding a number
of months, for the four ISO8601-like calendars (buddhist, gregory,
japanese, roc).
2025-11-26 17:40:44 +01:00
Philip Chimento
0fa672f26e Intl Era Monthcode: Test constraining day in islamic-umalqura calendar
Similar to https://github.com/tc39/test262/pull/4700 but this is for an
observational Hijri calendar, not a tabular one. Any month may have
either 29 or 30 days in any year. So we additionally test adding or
subtracting 1 year from day 30 of a month, and landing in a year where
that month has 29 days.

Observational month lengths are provided in a comment for convenience.
2025-11-26 17:37:37 +01:00
Philip Chimento
74480890c3 Intl Era Monthcode: Test constraining day in islamic-tbla calendar
Tests for year and month arithmetic around constraining the day to the
end of a 29 or 30 day month in leap and common years, in the
islamic-tbla calendar, for add(), subtract(), and with().

(This is a tabular calendar. Leap years and month lengths are the same
as in the islamic-civil calendar in the previous commit. The epoch day
is different which doesn't make a difference to the result of these
tests, so they are nearly identical to the islamic-civil tests in the
previous commit.)
2025-11-26 17:30:52 +01:00
Philip Chimento
97afc7df95 Intl Era Monthcode: Test constraining day in islamic-civil calendar
Tests for year and month arithmetic around constraining the day to the
end of a 29 or 30 day month in leap and common years, in the
islamic-civil calendar, for add(), subtract(), and with().

(This is a tabular calendar, so leap and common years follow a
mathematical pattern. Odd months have 30 days and even months have 29,
except the last month which has 30 days in leap years.)
2025-11-26 17:30:52 +01:00
Philip Chimento
8cb018e805 Intl Era Monthcode: Split out and expand end-of-month tests
These end-of-month tests were moved in from staging in
https://github.com/tc39/test262/pull/4667. Split them out into their own
files and expand to cover PlainDateTime and ZonedDateTime as well.
2025-11-26 17:25:21 +01:00
Philip Chimento
dbb09a19f1 Intl Era Monthcode: New durations used for both addition and subtraction
Make sure we test each of the new durations that were moved from staging
tests in both positive and negative form.
2025-11-26 17:25:21 +01:00
Philip Chimento
714b34cd99 Intl Era Monthcode: Create Chinese and Dangi calendar dates with options
Just to make sure we are not accidentally constraining, pass { overflow:
"reject" } to all from() calls in these tests.
2025-11-26 17:25:21 +01:00
Nicolò Ribaudo
0718086d97 Test export * as x from and import * as x; export { x } binding equivalence 2025-11-26 11:32:25 +01:00
Nicolò Ribaudo
605927eeba Move tests about ambiguous module bindings to a single folder 2025-11-26 11:32:25 +01:00
Tim Chevalier
1f8ce093d4 Temporal: Change leap month for 1987 in Chinese calendar tests
The test data included a case for year 1987, monthCode M07L.
This was incorrect; the leap month for 1987 was M06L.
This is due to a bug in ICU4C. These tests will have to be
expected-to-fail in ICU4C-based implementations until the underlying bug
is fixed. See https://github.com/tc39/test262/issues/4704
2025-11-25 14:40:35 -08:00
Jesse Alama
285785f988 Add CalendarResolveFields error ordering tests
Tests verify that CalendarResolveFields throws TypeError for missing
required fields before throwing RangeError for invalid field values.
2025-11-25 13:33:34 -08:00
Michael Ficarra
3e8ccb1227 address my own comments 2025-11-25 13:06:50 -08:00
Kevin Gibbons
e0738ee1ca split basic.js into harness+tests, add some more tests 2025-11-25 13:06:50 -08:00
André Bargull
004b7337af Add tests from #4496 for zipKeyed 2025-11-25 13:06:50 -08:00
André Bargull
9f464fdce8 Test IteratorZip iteration for zipKeyed 2025-11-25 13:06:50 -08:00
André Bargull
f6bb819cf5 Test basic functionality for zipKeyed 2025-11-25 13:06:50 -08:00
André Bargull
26c1185971 Test padding processing for zipKeyed 2025-11-25 13:06:50 -08:00
André Bargull
861ae35a1b Test iterables processing for zipKeyed 2025-11-25 13:06:50 -08:00