Commit Graph

6684 Commits

Author SHA1 Message Date
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
Philip Chimento 6595838b3d Temporal: Remove TimeZone.p.equals method
Some of the tests can be removed altogether since they deal with what
forms of input can be passed to ToTemporalTimeZoneSlotValue. Those are
tested on every method that takes a TimeZone as input.

Other tests are still relevant, but need to move to ZonedDateTime.p.equals
where the various quirks of time zone equality can still be tested. (Some
of these still will be removed in a following commit because they use
time zone objects.)

See: #2826
2024-07-05 10:43:53 +02:00
Philip Chimento 1213ab17ec Temporal: Remove getCalendar and getTimeZone methods
Temporarily replace them with getISOFields().calendar/timeZone just to
keep the tests running until we remove Calendar and TimeZone objects
altogether.

See: tc39/proposal-temporal#2826
2024-07-05 10:43:53 +02:00
Philip Chimento 73f85aeeaf Temporal: Add tests covering options bag argument of getTimeZoneTransition 2024-07-05 10:43:53 +02:00
Philip Chimento c22fbc7b45 Temporal: Port staging tests that use next/previousTransition
See: tc39/proposal-temporal#2826
2024-07-05 10:43:53 +02:00
Philip Chimento 71877cde79 Temporal: Move tests for getNext/PreviousTransition into ZonedDateTime
See: tc39/proposal-temporal#2826
2024-07-05 10:43:53 +02:00
Philip Chimento 9ff6ac3368 Temporal: Remove tests for argument of TimeZone.p.getNext/PreviousTransition
This is being moved to a method on Temporal.ZonedDateTime.prototype. It
will not take a Temporal.Instant argument.

See: tc39/proposal-temporal#2826
2024-07-05 10:43:53 +02:00
Ioanna M Dimitriou H 673856839c
RAB: Integrate staging tests for the .findLastIndex method (#4129)
* 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.
2024-07-04 13:15:53 -07:00
Ioanna M Dimitriou H 6f2eeebdcc
RAB: Integrate staging tests for the .findLast method (#4128)
* 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.
2024-07-04 12:48:33 -07:00
Ioanna M Dimitriou H 105906a49c
RAB: Integrate staging tests for the .findIndex method (#4127)
* 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.
2024-07-04 12:12:02 -07:00
Ioanna M Dimitriou H e023765890
RAB: Integrate staging tests for the .find method (#4126)
* 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.
2024-07-04 11:05:24 -07:00