Commit Graph

6520 Commits

Author SHA1 Message Date
Ioanna M Dimitriou H 0fca7339eb
RAB: Integrate staging tests for .at method (#4070)
* RAB: Integrate staging tests for .at method
of Array.prototype and TypedArray.prototype

This is part of PR #3888 to make reviewing easier.
Includes changes to use the helper ./harness/resizableArrayBufferUtils.js
2024-05-08 08:27:49 -07:00
Ioanna M Dimitriou H c95cc6873d
Collection of helper constants and functions for testing RABs (#4030)
Collection of helper constants and functions for testing resizable array buffers.

These are the parts of the code in RAB staging tests that are heavily repeated.
In order to somewhat compact the migration of RAB staging tests (see PR #3888).
2024-04-30 11:10:19 -07:00
Ben Allen 8724a0de23 ListFormats used in DurationFormat/prototype/format/fractions-of-subsecond-units-en.js were missing required `type: "unit"` option 2024-04-29 15:54:34 +02:00
Linus Groh cdf7ba7396 Fix typo in with statement test file name 2024-04-29 15:30:25 +02:00
Rezvan Mahdavi Hezaveh 27b6e4500f [explicit-resource-management]Add exception handling to sync ERM
This CL adds exception handling to the implementation of sync
explicit management proposal.

Bug: v8:13559
Change-Id: I2f4ffea432057b753634c2af4801f9dc48edac43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5405985
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#93620}
2024-04-26 20:18:23 +02:00
Frank Yung-Fong Tang c2ae5ed5e9 Fix mixed-short-and-numeric.js
The option for the listFormat need to include {type: "unit"}
2024-04-25 10:55:21 +02:00
André Bargull a640565994 Add test for negative zero inputs 2024-04-23 18:27:01 +02:00
André Bargull 859b5c67ef Update numeric-hour-with-zero-minutes-and-non-zero-seconds for new default display of sub-hours units
Numeric "minute" and "seconds" units now default to "always" display, so we have
to add an additional test to cover when "auto" display is used. Additionally add
more inputs to cover all possible test combinations.
2024-04-23 18:27:01 +02:00
André Bargull 19d2a38558 Add tests for negative durations with leading zero unit 2024-04-23 18:27:01 +02:00
André Bargull cadd064174 Use formatDurationFormatPattern for "/numeric-hour-with-zero-minutes-and-non-zero-seconds"
The changes from the first commit allow to use
`formatDurationFormatPattern` for this test.
2024-04-23 18:27:01 +02:00
André Bargull 330ecdd016 Sync partitionDurationFormatPattern with latest spec draft
Sync `partitionDurationFormatPattern` with the latest spec draft and
change it to use an `Intl.DurationFormat` object as the input, so it's
easier to compare it against the spec text and because it allows to test
more inputs.

Includes the fixes for:
- https://github.com/tc39/proposal-intl-duration-format/pull/183
- https://github.com/tc39/proposal-intl-duration-format/pull/184
2024-04-23 18:27:01 +02:00
Ben Allen b37947f3a4 Removed extraneous comment, added roundingMode: 'trunc' to NumberFormat options when fractional digits are formatted to match behaviour of DurationFormat -- doesn't make a difference with these test values, but could with others 2024-04-23 11:30:16 +02:00
Ross Kirsling 007b333af2 Add additional tests for tc39/ecma262#3307.
Ensure that the following cases are covered:
- https://github.com/tc39/ecma262/issues/3295#issuecomment-2058110314
- https://github.com/tc39/ecma262/issues/2659#issue-1131245695
2024-04-22 12:36:07 -07:00
Mathias Bynens 830b17a3a0 Update RegExp `\p{…}` tests per Unicode 15.1.0
Issue: #3945
2024-04-17 16:04:56 -07:00
Emmanuel Ferdman 79e9b39f3a Update the location of `2nd-param-non-object.js` 2024-04-15 12:09:43 -07:00
Marko Lahma 263c514afa Add missing DummyError function definition to target-super-computed-reference.js 2024-04-15 11:30:42 -07:00
Sosuke Suzuki 23c3e0111b Use space instead of tab in comments 2024-04-15 11:11:23 -07:00
Ross Kirsling 142a6a6fbe
Update test for o[p] = f() (#4052)
* Update test for o[p] = f()

Update S11.13.1_A7_T3.js now that consensus has been reached on https://github.com/tc39/ecma262/pull/3307.

* Rename test and add an analogous one for super.
2024-04-12 11:59:40 -07:00
Shu-yu Guo c5a80993cd Allow global var-via-eval be declared
See https://github.com/tc39/ecma262/pull/3226
2024-04-11 17:22:43 -07:00
Ben Allen 046dff4b33
test formatting when microseconds or nanoseconds are the first numeric-styled unit (#4034)
* test formatting when microseconds or nanoseconds are the first numeric-styled unit

* incorporated Philip Chimento guidance re: padding fractional components
2024-04-11 17:02:37 -07:00
Shu-yu Guo 0c43c587cc Fix groupBy string test keys to be insertion order 2024-04-11 16:56:41 -07:00
Ben Allen e11ef85b1b
added test for formatting mixture of short and numeric styles (#4033)
* added test for formatting mixture of short and numeric styles

* incorporated Philip Chimento feedback re: making test more general across locales
2024-04-11 16:29:13 -07:00
Frank Tang b37b6f3552 Fix incorrect tests landed in PR3890
https://github.com/tc39/test262/pull/3890
2024-04-11 16:33:56 +02:00
Philip Chimento d865ffeb2d Use correct keys in non-iso-calendars.js
Using Object.keys() of the expected values in each case decouples these
tests.
2024-04-10 08:37:31 -07:00
Philip Chimento bce41ea609 Reduce locale-dependence in non-iso-calendars.js
Previously, this test checked for a particular format. This would break
depending on which engine executed it. Instead, test for the presence of
particular types and their values in the output of formatToParts().

(There's an existing comment which suggests that this should already have
been testing formatToParts().)
2024-04-10 08:37:31 -07:00
Philip Chimento 9537de33af Remove performance logging from non-iso-calendars.js staging test
The performance logging was left over from when this test lived in the
proposal-temporal repo. It was already switched off anyway.
2024-04-10 08:37:31 -07:00
Adam Shaw 6c60904d42 test for all overflow/underflow scenarios 2024-04-08 18:24:26 -07:00
Adam Shaw 6c35fba9b2 adjust tests for round-zdt-day bugfix 2024-04-08 18:24:26 -07:00
Sosuke Suzuki b73f7d662d Use emoji strings 2024-04-04 12:47:57 -07:00
SUZUKI Sosuke 065ccc121e Update test/built-ins/Object/groupBy/string.js
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2024-04-04 12:47:57 -07:00
SUZUKI Sosuke 8245443f8f Update test/built-ins/Map/groupBy/string.js
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2024-04-04 12:47:57 -07:00
Sosuke Suzuki 112cf25567 Add tests for `Object.groupBy` and `Map.groupBy` with string items 2024-04-04 12:47:57 -07:00
Ben Allen e0a0c27796
DurationFormat: added tests for default styles for units following numeric-styled units (#4032) 2024-04-03 18:09:00 +02:00
Philip Chimento 63933d1da5 Temporal: Tests that dateStyle affects toLocaleString output
For each Temporal type, add a test (which should not be sensitive to the
exact locale format) that ensures dateStyle affects the output, for a
Gregorian and non-Gregorian calendar.

See https://github.com/tc39/proposal-temporal/issues/2058
2024-04-03 12:32:46 +02:00
Philip Chimento a074d97c5b Temporal: Tests for conversion of ISO 8601 string to ISO 8601 calendar
See https://github.com/tc39/proposal-temporal/issues/2105. This was not
covered yet in test262.
2024-04-03 12:32:46 +02:00
Philip Chimento a8da70622d Temporal: Tests for calendar.dateFromFields options in PYM/PMD.toPlainDate
It was previously not tested what options value a custom calendar's
dateFromFields() method would be called with, when called from the
toPlainDate() method of PlainYearMonth/PlainMonthDay.

See tc39/proposal-temporal#2803
2024-04-03 12:32:46 +02:00
Philip Chimento b4b574fca1 Temporal: argument-propertybag-calendar-year-zero testing the wrong thing
These tests were supposed to test an invalid ISO string being used as the
`calendar` property in a property bag. Instead they were testing being
used as an invalid ISO string directly where a PlainDate input was needed.
(That is also already covered elsewhere.)
2024-04-03 12:32:46 +02:00
Philip Chimento 0cb219ffe0 Temporal: Fix argument-propertybag-calendar-number testing the wrong methods
Due to overlooked copy-paste errors we were creating the wrong type of
instance in these tests, and therefore testing the wrong method.

(Add blank line for consistency with the other instances of these tests.)
2024-04-03 12:32:46 +02:00
Philip Chimento d7aec8e178 Temporal: Add test for Duration going out of range after rounding
After rounding relative to a ZonedDateTime, we have to potentially adjust
for DST. With a time zone providing nonsensical values, the duration may
go out of range.

See: tc39/proposal-temporal#2801
2024-04-03 12:32:46 +02:00
Philip Chimento f03883c7bb Temporal: Fix assertion message about float64-representable integer
This test isn't testing what the assertion message previously said it was
testing. The integer is allowed to be unsafe, but in this case its
float64-representation is out of range.

See: https://github.com/tc39/proposal-temporal/issues/2785
2024-04-03 12:32:46 +02:00
Philip Chimento c4f5778671 Temporal: Add tests for mixed signs in DifferenceTemporalPlainDateTime
With test cases kindly provided by Anba, this adds test coverage for the
abrupt completion in the last step of DifferenceTemporalPlainDateTime,
where the resulting Duration components have mixed signs.

See: https://github.com/tc39/proposal-temporal/issues/2783
2024-04-03 12:32:46 +02:00
Philip Chimento c8a876b1d9 Temporal: Add clarifying assertion messages
normalized-time-duration-to-days-range-errors.js tests for several error
cases in the AO NormalizedTimeDurationToDays. Adding assertion messages
helps to know which one you are debugging.
2024-04-03 12:32:46 +02:00
Philip Chimento 0c12b84244 Temporal: Add tests for incorrectly capitalized annotation keys
As per IETF, annotation keys may only consist of lowercase letters,
dashes, and digits, and an optional leading underscore. Uppercase letters
are non-syntactical. Add tests covering this.
2024-04-03 12:32:46 +02:00
Philip Chimento 8b781361a9 Temporal: Add test for last step of UnbalanceDateDurationRelative throwing
Based on a test case by Anba.
See https://github.com/tc39/proposal-temporal/pull/2690#issuecomment-1938768702
2024-04-03 12:32:46 +02:00
Philip Chimento f4f33d272c Temporal: Fix assertion message 2024-04-03 12:32:46 +02:00
Philip Chimento 9e539a07d7 Remove ChakraCore CI job
Installation of ChakraCore by ESVU for some reason has been flaky for
quite a long time. Can't reproduce locally. This CI job doesn't add much
value by itself, so just remove it until some future time.

Closes: #3953
2024-04-02 11:14:32 +02:00
Philip Chimento 1e3d8cbb37 Add extra tests for newly fixed bug 2024-04-01 17:44:45 -07:00
Adam Shaw 96718952b0 updated tests for ZDT diffing w/ backoffs 2024-04-01 17:44:45 -07:00
Philip Chimento 984f3cc284 Temporal: Tests for correct intermediate value in ZonedDateTime difference/rounding
These test cases ensure that DST disambiguation does not take place on
intermediate values that are not the start or the end of the calculation.

Note that NormalizedTimeDurationToDays is no longer called inside
Temporal.Duration.prototype.add/subtract, so a few tests can be deleted.

Other tests need to be adjusted because NormalizedTimeDurationToDays is
no longer called inside Temporal.ZonedDateTime.prototype.since/until via
DifferenceZonedDateTime, although it is still called as part of rounding.

In addition, new tests for the now-fixed edge case are added, and for the
day corrections that can happen to intermediates.

See https://github.com/tc39/proposal-temporal/pull/2760
2024-04-01 17:44:45 -07:00
Sosuke Suzuki d19cb1557c Fix `Array.groupBy` to `Object.groupBy` in `features.txt` 2024-04-01 12:27:52 -07:00