7009 Commits

Author SHA1 Message Date
André Bargull
e8b9a6a1d9 Remove unused 'clone_object_check' 2025-05-28 15:58:01 +02:00
André Bargull
965e505fb8 Remove a Gecko profiler specific test case 2025-05-28 15:58:01 +02:00
André Bargull
2497ed0ae9 Replace another deepEqual function from sm-staging
Replace the `deepEqual` function with `assert.compareArray` resp.
`verifyProperty`.

Also remove the second part of "sm/strict/15.4.5.1.js", because it's
terribly out-dated w.r.t. the SpiderMonkey implementation of Array
objects.
2025-05-28 15:58:01 +02:00
André Bargull
43670a1912 Replace assertDeepEq with assert.deepEqual 2025-05-28 15:58:01 +02:00
André Bargull
bbbc23cd41 Don't test error messages in staging/sm 2025-05-28 15:58:01 +02:00
André Bargull
a709831c8d Remove support file for non-exported structured cloning test 2025-05-28 15:58:01 +02:00
André Bargull
081cbfc975 Fix PluralRules notation test
- Change the locale to "fr", it's more likely to be present in
  implementations when compared to "sl".
- Test all possible "notation" values.
2025-05-26 15:02:48 +02:00
André Bargull
b3d0c57f7f Move PluralRules notation into correct directory 2025-05-26 15:02:48 +02:00
André Bargull
7d0984ba52 Fix bugs for PluralRules notation 2025-05-26 15:02:48 +02:00
André Bargull
3316c0aaf6 Test all combinations in temporal-plaindatetime-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
96695862e2 Test all combinations in temporal-plainyearmonth-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
a55bf7da9e Test all combinations in temporal-plainmonthday-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
24f6f7a014 Test all combinations in temporal-plaindate-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
c3db26368f Test all combinations in temporal-plaintime-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
36c81b9761 Split temporal-objects-formatting.js into separate files for each Temporal type 2025-05-22 14:24:47 +02:00
André Bargull
ef71f5e2a6 Fix expected result for short date-style
Compare to `dateTimeFormatterShortMedium`, which also uses the
`short` date-style.
2025-05-22 14:24:47 +02:00
André Bargull
e8e50b5746 Place closing parenthesis at the correct location 2025-05-22 14:24:47 +02:00
Ron Buckton
419d85ad21
[explicit-resource-management] Add remaining tests specific to using in for-of and for-await-of syntax (#4484) 2025-05-21 13:45:41 -07:00
Sosuke Suzuki
4b5d36ab6e Add missing async flag to AsyncIteratorPrototype tests 2025-05-19 14:09:55 +02:00
liuxingbaoyu
dc2a152457
fix (#4493) 2025-05-19 14:02:10 +02:00
Richard Gibson
296e7875bd RegExp: Add test cases for Unicode Script_Extensions=Unknown
Ref https://github.com/tc39/ecma262/issues/3590

regexp-generator is unfortunately unaware of the value:
https://github.com/mathiasbynens/regenerate-unicode-properties/issues/7
2025-05-16 12:49:45 -07:00
Nick Vatamaniuc
c6251c64b1 Increase the tolerance of approx acos and cbrt tests
On engines which pass through these functions to the libc library they can
return slightly different values depending on the OS and archictures.

Showing a few example with Python, which also passes these through to libc on a
few platforms I have access to:

Ubuntu Noble, Python 12, s390x
```
>>> import math

>>> math.cbrt(math.e)
1.3956124250860897

>>> math.acosh(math.cosh(0.2))
0.20000000000000023
```

Ubuntu Noble, Python 12, x86_64
```
>>> import math

>>> math.cbrt(math.e)
1.39561242508609

>>> math.acosh(math.cosh(0.2))
0.20000000000000023
```

MacOS 14, Python 12, x86_64
```
>>> import math

>>> math.cbrt(math.e)
1.3956124250860895

>>> math.acosh(math.cosh(0.2))
0.20000000000000026
```
2025-05-16 12:12:39 +02:00
Jordan Harband
2472953ec1
Merge pull request #4479 from rbuckton/explicit-resource-management-DisposableStack
[explicit-resource-management] Add remaining tests specific to `DisposableStack`
2025-05-15 21:37:17 -07:00
Ron Buckton
4dfd813f0d Update test/built-ins/DisposableStack/prototype/constructor.js
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2025-05-15 21:34:15 -07:00
Ron Buckton
fe1c065cbb Add remaining tests specific to DisposableStack 2025-05-15 21:34:15 -07:00
Daniel Minor
c2e3e37b68
Move WeakMap.prototype.getOrInsert tests from staging to built-ins (#4476)
* Fix esid and remove noStrict

* Fixup length.js and returns-value-if-key-is-not-present-symbol-key.js
2025-05-15 11:59:43 -07:00
André Bargull
1049f77ba3 Ensure typed array length is retrieved early in Atomics.{notify,wait} 2025-05-15 14:13:35 +02:00
Philip Chimento
37ebe00a15 Remove usage of Object.hasOwn in helper files
Instead use the easily available old-fashioned way, calling the method
on Object.prototype.
2025-05-15 11:42:44 +02:00
André Bargull
49a4e1e7c8 Fix copy-paste errors in Atomics tests 2025-05-15 11:18:46 +02:00
Ujjwal Sharma
453887559d Add 'notation' option to PluralRules tests and update related assertions
Refs: https://github.com/tc39/ecma402/pull/989
2025-05-14 10:43:30 -07:00
Philip Chimento
8fa9d38753
Temporal: Make gregory week numbers undefined (#4467) 2025-05-14 13:20:36 -04:00
Philip Chimento
118db52dd4
Temporal: Add coverage for getTimeZoneTransition edge cases (#4466)
getTimeZoneTransition return values should always correspond with UTC
offset transitions, not with time zone metadata changes such as making
DST permanent or updating abbreviation strings.

See: https://github.com/tc39/proposal-temporal/issues/3105
2025-05-14 13:04:43 -04:00
Philip Chimento
20d4558f39
Temporal: Add test coverage for close-together time zone transitions (#4471)
Check that implementations correctly detect time zone transitions that
are close together. Additionally, test startOfDay() since the time zone
transitions in Brazil occur at midnight.

See https://github.com/tc39/proposal-temporal/issues/3110
2025-05-14 12:27:19 -04:00
Richard Gibson
25278a150d
harness: Add a verifyCallableProperty helper (#4468) 2025-05-14 12:08:11 -04:00
Sosuke Suzuki
5e201642db Add tests for rejected %AsyncIteratorPrototype%.@@asyncDispose 2025-05-14 08:37:17 -07:00
Daniel Minor
2e59aad8d1
Move Map.prototype.getOrInsert tests from staging (#4472)
* Move Map.prototype.getOrInsert tests from staging

* Fix esid and remove noStrict

* Add check for map.get(-0) to append-new-values-normalizes-zero-key.js
2025-05-12 13:27:39 -07:00
Richard Gibson
545df3a432
Fix front matter for test/intl402/Locale/prototype/region/prop-desc.js (#4475) 2025-05-08 18:53:11 -04:00
Nicolò Ribaudo
bcdafc269f
Increase coverage for dynamic import and top-level await (#4421) 2025-05-08 16:55:49 +02:00
Daniel Minor
93d63969bc
Add upsert tests (#4454)
These tests are currently being executed in SpiderMonkey as `non262` tests,
and were exported using the `test262-export.py` script. Linting errors
were then corrected.
2025-05-05 12:20:47 -07:00
Sosuke Suzuki
27622d7647 Use assertNativeFunction instead of simple regexp pattern 2025-04-29 13:57:47 +02:00
Philip Chimento
ac9ff9bf75 Add coverage for remapping of eras in Temporal dates
See note 2 on eras in CalendarResolveFields:
https://tc39.es/proposal-temporal/#sec-temporal-calendarresolvefields

This behaviour was not yet covered by any test262 tests.

Based on Anba's tests from https://github.com/tc39/test262/pull/4080 but
with different behaviour.
2025-04-29 13:45:50 +02:00
Seokho Song
cba890eef0 add throw-type-error-before-custom-proto-access.js 2025-04-24 15:32:25 +02:00
brageh01
443f0d2e7f
Temporal: Reorganize calendar and wrong-type tests (#4415)
Changes made to:

- PlainDate
- PlainYearMonth
- ZonedDateTime
- PlainDateTime
- PlainMonthDay

Merged calendar-number.js and calendar-wrong-type.js, due to no special behaviour of number to be tested.

Extracted string tests to calendar-iso-string.js and renamed the file to calendar-invalid-iso-string.js, due to the contents of the file initially testing invalid ISO strings.

Closes #3873
2025-04-23 16:04:15 -07:00
Tim Chevalier
64237beb0d Fix annotations 2025-04-23 11:51:56 -07:00
Tim Chevalier
0e0bf3c6bd Fix locale 2025-04-23 11:51:56 -07:00
Tim Chevalier
2107067d2e Rewrite tests to check for substrings rather than checking the entire output against an expected string 2025-04-23 11:51:56 -07:00
Tim Chevalier
c3b2287d2b Temporal: Add test for different combinations of DateTimeFormat options
This test file adds tests for all types of Temporal objects and various
combinations of style options for Intl.DateTimeFormat.
2025-04-23 11:51:56 -07:00
Nicolò Ribaudo
eeacc18d05 Fix import defer test bugs 2025-04-23 10:55:52 -07:00
Philip Chimento
c3c318cf11 Temporal: Add coverage for weird PlainMonthDay leap day constrain case
If you have a leap day, such as February 29, and you get input such as
{ monthCode: "M02", day: 30 }, { overflow: "constrain" }, then you want
the day to be constrained to the leap day February 29, not February 28
as the maximum day would be in a common year. Add tests for this case
for each supported calendar.
2025-04-21 10:06:18 -07:00
Philip Chimento
fa0a3081bd Temporal: Increase coverage of dateStyle and timeStyle
Add coverage in particular for dateStyle: undefined and timeStyle:
undefined, and for dateStyle applying to PlainMonthDay/PlainYearMonth
which were not tested.
2025-04-21 10:06:18 -07:00