Commit Graph

6744 Commits

Author SHA1 Message Date
Nicolò Ribaudo 29fe58bc8f
Update LICENSE (#4107)
* Update LICENSE

* Update LICENSE

* Update LICENSE

Co-authored-by: Jordan Harband <ljharb@gmail.com>

---------

Co-authored-by: Jordan Harband <ljharb@gmail.com>
2024-07-24 09:36:44 -07:00
Paul Bakker f55e99796f
Prevent harness code not loading when async/generator/asyncGenerator not supported (#4164)
* Dont throw when async/generato/asyncGenerator not supported

* Apply suggestions from code review
2024-07-24 09:18:02 -07:00
Timothy Flynn d8aa2e4ef7 Update NumberFormat.prototype.useGrouping test for CLDR 45
In CLDR 45, in the en-IN locale, the compact thousands symbol changed
from 'T' to 'K' after a survey was conducted in India:

b8d4472975
2024-07-24 08:53:41 -07:00
Ioanna M Dimitriou H ba92881748
RAB: Integrate staging tests for the .length method (#4154)
* Import relevant files from #3888

* Adds resizableArrayBufferUtils.js to includes and removes its content
from each test. Also splits tests for .byteLength and .byteOffset to
new files in the respective directories.

Test lines calling .buffer in .../length/resizable-buffer-assorted.js
were not split to .../buffer/ as they seem to only do a check for the
test on .length but perhaps they need to be also split to a new file
.../buffer/resizable-buffer-assorted.js
2024-07-23 16:42:45 -07:00
Paul Bakker 0a8622de68 Dont use const in for (of) loops, for when those aren't properly
supported
2024-07-23 15:40:13 -07:00
Leo Balter 880f8a5ba6 Add tests for RegExp.escape 2024-07-18 17:30:09 +02:00
Sosuke Suzuki d09ecdb57b Use spaces instead of tabs 2024-07-18 12:12:03 +02:00
Ioanna M Dimitriou H 63e81baf5b
RAB: Integrate staging tests for the .lastIndexOf method (#4153)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Some changes for readability.
2024-07-17 17:37:17 -07:00
Ioanna M Dimitriou H 97cf4fd6e9
RAB: Integrate staging tests for the .keys method (#4138)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Removes redundant documentation

* Address review comments.
2024-07-16 09:25:18 -07:00
Meghan Denny 5e602555d0 features.txt: arraybuffer-transfer is stage 4 2024-07-15 14:02:33 +02:00
magic-akari 03ade8b46a
Add missing test for `Math.pow(1, NaN)` (#4149) 2024-07-15 13:58:33 +02:00
Jordan Harband b01075d87c
Merge pull request #4151 from lahma/missing-compare-array-helpers
Add missing compareArray includes
2024-07-13 11:17:46 -07:00
Marko Lahma c6a36ccc64 Add missing compareArray includes 2024-07-13 12:35:04 +03:00
Ioanna M Dimitriou H 694fae5b10
RAB: Integrate staging tests for the .join method (#4137)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Removes forgotten ArrayJoinHelper
2024-07-12 09:32:10 -07:00
Ioanna M Dimitriou H ab0c31a458
RAB: Integrate staging tests for the .indexOf method (#4136)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Restructures ArrayIndexOfNumOrBigInt to use MayNeedBigInt as it seems clearer.

* Adds missing test file for Array.prototype.indexOf
2024-07-11 16:05:07 -07:00
Ioanna M. Dimitriou H 88b013ff7f Adds missing test file for Array.prototype.includes 2024-07-11 15:57:08 -07:00
Ioanna M. Dimitriou H 441cbef061 Restructures ArrayIncludesNumOrBigInt to use MayNeedBigInt as it seems clearer. 2024-07-11 15:57:08 -07:00
Ioanna M. Dimitriou H 3dde047c84 Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.
2024-07-11 15:57:08 -07:00
Ioanna M. Dimitriou H 14de2ce388 Import relevant files from #3888 2024-07-11 15:57:08 -07:00
Ioanna M. Dimitriou H 0ce0bd7314 Renames ResizeBufferMidIteration to ResizeMidIteration 2024-07-11 15:42:35 -07:00
Ioanna M. Dimitriou H 8ca7c1a42a Adds missing Array.prototype.filter \'shrink\' tests and some typesetting 2024-07-11 15:42:35 -07:00
Frank Yung-Fong Tang 753d502e9a Update the expctation of constructor-options-firstDayOfWeek-valid.js
true will be dropped inside UTS35
2024-07-11 15:24:54 -07:00
Shu-yu Guo 58751ca335
Add tests for Atomics.pause (#4147)
* Add tests for Atomics.pause

* Address review
2024-07-11 11:17:24 -07:00
Chengzhong Wu 830c52155d Fix AbstractModuleSource verifyProperty calls 2024-07-11 15:04:07 +02:00
Frank Tang 7b154389ce Update firstDay test to latest spec after PR 79
Spec Changes merged
https://github.com/tc39/proposal-intl-locale-info/pull/79
2024-07-10 11:20:28 -07:00
André Bargull 318df8f01e Delete harness test for removed TemporalHelpers.oneShiftTimeZone function 2024-07-10 10:47:36 -07:00
Rezvan Mahdavi Hezaveh 97e0bef215 [explicit-resource-management] Add await using to the bytecode generator
This CL adds subtypes (SyncJSDisposableStack and AsyncDisposableStack)
to JSDisposableStack as well as `await using` to the bytecode generator.
Currently async generators are broken and the fix is left as a TODO
in this CL. Also, exception handling (promise rejections) will be
completed in a follow up CL.

Bug: 42203814
Change-Id: I303a380b57fb4ab4662e4f55fb4dc9b14d18cd2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5569647
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#94944}
2024-07-10 10:19:19 -07:00
André Bargull 16322d384a Allow alternative era names
Temporal doesn't specify concrete era names, so tests shouldn't assert
for example that the era code of the current Gregorian era is `"ce"`. We
still want to validate the era names somehow however, so allow alternative
era names using the era codes from the "Intl era and monthCode" proposal.
2024-07-10 07:59:20 -07:00
André Bargull 0ff7881d75 Use explicit relative paths 2024-07-10 16:02:53 +02:00
André Bargull 507c28b3f9 Fix strict mode errors 2024-07-10 13:57:33 +02:00
Kevin Gibbons 08e1aa808a
Tests for later base64 changes (#4133)
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2024-07-10 11:35:22 +02:00
Meghan Denny 997600841f features.txt: upgrade stage4 proposals 2024-07-10 11:30:42 +02:00
Ioanna M Dimitriou H 41958b6a90
RAB: Integrate staging tests for the .forEach method (#4134)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while adjusting usage of CollectValuesAndResize and applying review changes
from PRs for previously tested methods.

* Added missing 'shrink' tests for Array.prototype.forEach and removed forgotten lines

Also renames ResizeBufferMidIteration to ResizeMidIteration

* Forgotten by copy paste
2024-07-09 18:07:33 -07:00
Jordan Harband b8cb40b66a
Merge pull request #3994 from tc39/base64-tests
add tests for base64 proposal
2024-07-08 09:56:03 -07:00
Philip Chimento 3a7a72aef5 Temporal: Add tests for conversion of calendar and time zone IDs in constructors
Now that we don't have to deal with strings or objects as input to the
calendar ID or time zone ID parameter of constructors, we accept only the
data that actually goes into the internal slots.
2024-07-05 10:43:53 +02:00
Philip Chimento cb13595617 Temporal: Add staging test to check June 2024 API removals
This test should trip if an implementation forgets to perform the removals
that reached consensus in June 2024. (Although such an implementation
would technically comply with the specification, if you really need to do
that, please open an issue on the Temporal proposal repo rather than just
skiplisting this test.)
2024-07-05 10:43:53 +02:00
Philip Chimento bbfcfd59b0 Temporal: Port staging tests that require non-ISO calendar or non-UTC time zone
As in the previous commit, without custom calendars and time zones, some
functionality cannot be tested on implementations that don't have any
other calendars and time zones than iso8601 and UTC.

Some of the staging tests fall in this category. We take the opportunity
to port these into proper tests, in the intl402/ folder.
2024-07-05 10:43:53 +02:00
Philip Chimento efc7424844 Temporal: Don't use getISOFields() in other tests
Previously getISOFields() was used to get the exact value of the
[[Calendar]] and [[TimeZone]] internal slots, as well as to get the
reference ISO year for PlainMonthDay and reference ISO day for
PlainYearMonth.

Use calendarId and timeZoneId for the former and toString() for the
latter.
2024-07-05 10:43:53 +02:00
Philip Chimento 7e4de57437 Temporal: Remove tests for getISOFields methods 2024-07-05 10:43:53 +02:00
Philip Chimento e5ef51ba7e Temporal: Move tests into intl402/ that require non-ISO calendar or non-UTC time zone
Without custom calendars and time zones there are actually a bunch of
things that we now can't test on implementations that don't have non-ISO
calendars or non-UTC time zones. (Alternatively, we can say that these are
functionalities that those implementations don't have to implement.)
2024-07-05 10:43:53 +02:00
Philip Chimento 9671c4a613 Temporal: Test adjustments for removing calendar and time zone objects 2024-07-05 10:43:53 +02:00
Philip Chimento 5cd7e9077d Temporal: Remove calendar and time zone observers
These are no longer possible without custom objects. Also add an exception
for calendar and timeZone properties in property bag observers so they are
not treated as objects.
2024-07-05 10:43:53 +02:00
Philip Chimento 27bc974287 Temporal: Replace TemporalHelpers.specificOffsetTimeZone with offset strings 2024-07-05 10:43:53 +02:00
Philip Chimento 0a1cb1307f Temporal: Edit test descriptions that refer to Calendar and TimeZone objects 2024-07-05 10:43:53 +02:00
Philip Chimento 372527e572 Temporal: Don't pass custom calendar in helper tests
This is no longer necessary if there are no calendar objects.
2024-07-05 10:43:53 +02:00
Philip Chimento 9c6734f39b Temporal: Remove Calendar and TimeZone objects from "wrong-type" tests
Test the "wrong type of object" with Duration objects where appropriate,
otherwise just use plain objects.
2024-07-05 10:43:53 +02:00
Philip Chimento debd22a2ad Temporal: Remove tests that throw on calendar or time zone method accesses
Many tests tested some functionality while asserting that there were no
calls of calendar or time zone methods. We can continue testing the
functionality, but there are no more methods to call, so we can delete
those parts of the tests.
2024-07-05 10:43:53 +02:00
Philip Chimento 7d970fbe4e Temporal: Remove fake West Coast and Samoa time zones from TemporalHelpers
It's no longer possible to fake built-in time zones using custom objects.
So testing DST shifts will have to use real built-in time zones. Replace
TemporalHelpers.springForwardFallBackTimeZone with America/Vancouver (it
was modelled on the DST transitions in 2000) and
TemporalHelpers.crossDateLineTimeZone with Pacific/Apia (it was modelled
on the 2011 switch to the other side of the international date line.)

These tests have to move to the intl402/ folder since non-Intl-aware
implementations are allowed (but not required) to support any built-in
time zones other than UTC.
2024-07-05 10:43:53 +02:00
Philip Chimento c728e6d89e Temporal: Fix tests that unnecessarily create TimeZone or Calendar instances
In many cases we created a TimeZone or Calendar instance from a built-in
time zone or calendar. These tests can be trivially adapted to just use
the string ID.
2024-07-05 10:43:53 +02:00
Philip Chimento ea2268aa43 Temporal: Remove tests directly relating to custom calendar and time zones
These are tests that just won't apply anymore without custom calendars and
time zones.
2024-07-05 10:43:53 +02:00