6926 Commits

Author SHA1 Message Date
André Bargull
ef8d9be0b0 Fix islamic-civil calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
05b7f0fc75 Fix islamicc calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
496b6c195f Fix indian calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
9bf4e0f2f4 Fix ethiopic calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
aae8f8a8d8 Fix ethioaa calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
cc9cb90005 Fix coptic calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
c7dba7860e Fix gregory calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
e2349bd24a Fix persian calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
b67d395ed5 Fix japanese calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
c4b6ea79da Fix iso8601 calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
467acc8ec8 Fix roc calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
e493362aec Fix buddhist calendar test case 2025-03-19 13:51:31 +01:00
André Bargull
5c8013f45d Remove test data for other calendars 2025-03-19 13:51:31 +01:00
André Bargull
e627bd8090 Copy non-iso-calendars to calendar specific files 2025-03-19 13:51:31 +01:00
Tim Chevalier
ef4305ee4d
Fix comment (#4430) 2025-03-17 20:42:51 +00:00
André Bargull
d77a127c21 Fix expected maximumFractionDigits for compact notation
[[MaximumFractionDigits]] is set to zero in SetNumberFormatDigitOptions,
step 24.b.
2025-03-14 14:58:39 +01:00
André Bargull
4a611cbaca Fix expected value for UTC-like time zone
If `timeZone` should be preserved, then it can't be the same string as
`utcDateTime.timeZoneId`.
2025-03-14 11:39:12 +01:00
Philip Chimento
7708262a21 Update ESIDs of Temporal.*.prototype properties
These ESIDs were updated to use dots instead of dashes, to be more
consistent with the ESIDs of other properties.
2025-03-14 09:26:47 +01:00
Aurèle
3f10507650 Regenerate character class escape tests 2025-03-13 11:58:44 -07:00
Aurèle
05fbae4993 Fix Regex Character Class Escape Tests
For each character class escape (\d, \D, \s, \S, \w, \W), check
positive cases (the escape matches all characters it's supposed to
match) and negative cases (the escape doesn't match any of the
characters it should not match).  Each of these checks is also done in
Unicode mode and with the v flag.

This uses regenerate.js from the unicode-property-escapes-tests
repo to generate strings that contain exactly the characters that
are supposed to be matched or not matched for each escape.

Comparison is done with regex test instead of regex replace to
optimize the tests.

This is part of my work at the SYSTEMF lab at EPFL.

Avoid modifying the regenerate library object prototype.
2025-03-13 11:58:44 -07:00
Philip Chimento
48bb262183 Update UTC time zone canonicalization to match proposal-canonical-tz
The test for https://github.com/tc39/ecma402/pull/724 (added in
https://github.com/tc39/test262/pull/4328) didn't take the Time Zone
Canonicalization proposal into account; but it should, because that
proposal is stage 3.

As of that proposal, the [[TimeZone]] slot of DateTimeFormat gets the
case-regularized original identifier, no longer the primary identifier. So
the resolvedOptions().timeZone property also no longer returns the primary
identifier.
2025-03-12 17:28:07 -07:00
Philip Chimento
e611532c98 Fix final newline linter error 2025-03-12 17:06:01 -07:00
ayuan0828
e0739b76a7 decodeURIComponent test 2025-03-12 17:06:01 -07:00
ayuan0828
b5ce1ae754 Create throws-URIError.js 2025-03-12 17:06:01 -07:00
Tim Chevalier
0c2144e3e6 Temporal: Fix missing close quotation mark in error message 2025-03-12 15:33:09 -07:00
Philip Chimento
84f820258b harness: Remove hidden-constructors harness file
The objects it provides are also available in another harness file,
wellKnownIntrinsicObjects.js. There's no point in duplicating that in the
harness. Rewrite each test that used hidden-constructors.js to use
getWellKnownIntrinsicObject instead.
2025-03-11 18:14:55 -07:00
Philip Chimento
2af27af915 harness: Add a function to get well-known intrinsic objects
wellKnownIntrinsicObjects.js now exposes a getWellKnownIntrinsicObject()
function which returns the object corresponding to a key like %Array%. If
the object is not provided by the implementation, or not accessible, it
throws a Test262Error. This is so that tests depending on that intrinsic
object can easily fail.
2025-03-11 18:14:55 -07:00
Philip Chimento
e133564cfa harness: Update list of well-known intrinsics
Looks like this list hasn't been updated in a while. Add
%AsyncGeneratorPrototype%, %GeneratorPrototype%, %Iterator%,
%IteratorHelperPrototype%, and %WrapForValidIteratorPrototype%.

%IteratorPrototype% is no longer a well-known intrinsic; I guess it was
removed because ever since iterator helpers it's accessible as
%Iterator.prototype%.

%Iterator% is available as the global property Iterator, but include a
fallback for implementations that haven't yet implemented iterator
helpers.
2025-03-11 18:14:55 -07:00
Philip Chimento
18ce488401 harness: Correct sources of %{Async,}GeneratorFunction%
As far as I can tell these are wrong, giving %GeneratorFunction.prototype%
and %AsyncGeneratorFunction.prototype% instead. These new expressions are
how MDN claims you can get the intrinsics.
2025-03-11 18:14:55 -07:00
Philip Chimento
a4536dc65f harness: Add clarifying comments about inaccessible intrinsics
As far as I know, %AsyncFromSyncIteratorPrototype% and
%ForInIteratorPrototype% are not (and not intended to be) accessible to
ECMAScript user code, so they are impossible to test directly. Add a
clarifying comment, and make the source expression consistent ('' vs.
'undefined').
2025-03-11 18:14:55 -07:00
Ms2ger
ece6726c1e Document ordering requirements of imported files 2025-03-11 18:10:26 -07:00
Ms2ger
0399f644e6 Normalize line endings in INTERPRETING.md 2025-03-11 18:10:26 -07:00
Rezvan Mahdavi Hezaveh
d6897d560b After a recent normative change on iterator helpers, the expectations of
these tests should be updated.
2025-03-11 18:05:19 -07:00
Luca Casonato
abc22b515e
Add tests for not calling well-known symbols on primitives for string methods (#4404)
* Add tests for not calling WK symbols on primitives for string methods

* clean up tests

* fix info in test files
2025-03-11 17:54:04 -07:00
Seokho Song
f250da9bf4 Add testcases for setUTC* functions return value 2025-03-11 17:04:18 -07:00
Tim Chevalier
3f65b0209d Temporal: Fix error message in test 2025-03-10 14:32:17 -07:00
Sosuke Suzuki
9d8efae5c2 Wrap toSpliced call with try-finally 2025-02-28 15:04:37 +01:00
Nicolò Ribaudo
2ad7f321d7 Rewrite import defer resolution test ot not expect specific error 2025-02-27 16:08:00 +01:00
Linus Groh
88ebb1e375 Avoid relative imports outside of test directory 2025-02-26 16:39:22 +01:00
Rezvan Mahdavi Hezaveh
d4c93d2de1 [explicit-resource-management] Dispose the stack before disposal
This CL adds the requirement of having disposed stack before
calling DisposeResources on the DisposableStack.

Bug: 42203506
Change-Id: I515a5f23e609fdd9448cebc4cd71b0176c86cf99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6298949
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98902}
2025-02-25 03:18:41 +01:00
Rezvan Mahdavi Hezaveh
15e602780c [explicit-resource-management] Fix async disposal
This CL fixes the async disposal from sync methods that return
a promise. The result of calling `symbol.dispose` should
not be used to resolve the outer promise.

Bug: 42203814
Change-Id: I4c4573035b74b06ad78e2810e3f132301954c048
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6291492
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98898}
2025-02-24 22:18:44 +01:00
Philip Chimento
44d71fbe7d Temporal: Test coverage for rejecting too large dates in PlainMonthDay strings
This adds coverage for the normative change in
https://github.com/tc39/proposal-temporal/pull/3054, which specifies that
implementations must throw on out-of-range dates in RFC 9557 strings for
non-ISO calendars.
2025-02-21 18:47:44 -08:00
Rezvan Mahdavi Hezaveh
b3f67f4aaf [explicit-resource-management] Fix await using in top level module
This CL adds one suspend point in any scope that has at least one
`await using` in it.

Bug: 396661138
Change-Id: I144a0ca49395b34309e7e35f070c98cc145af34b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6279751
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98811}
2025-02-19 22:18:46 +01:00
Rezvan Mahdavi Hezaveh
6d5e6c229e
Remove let keyword and use using declaration (#4403) 2025-02-18 12:54:05 -08:00
Chengzhong Wu
74788df072
Remove source phase resolution time negative error types (#4194) 2025-02-18 16:11:31 +01:00
Nicolò Ribaudo
43c45f3b37 Remove SM staging tests wrongly testing invalid LHS
It is an early error if the LHS of:
- ForOfStatement
- UpdateExpression
- AssignmentExpression
- DestructuringAssignmentTarget
is not simple (i.e. not a function call).
2025-02-18 14:23:33 +01:00
André Bargull
e8c771e9df Add basic tests for Intl.DurationFormat accepting Temporal.Duration 2025-02-14 09:01:03 -08:00
lionel-rowe
6310295c80 Add Intl.Locale test for language getter where language subtag is "und" 2025-02-13 11:36:40 -08:00
Frank Yung-Fong Tang
37722d8826
Add test for useGrouping off in digital style of DurationFormat (#4208)
* Add test for useGrouping off in digital style of DurationFormat

Fix #4190

* change based on review feedback
2025-02-12 11:42:21 -08:00
Brage Hogstad
26db872ca7 Moved generic era and eraYear tests from intl402/Temporal to built-ins/Temporal 2025-02-12 11:36:45 -08:00