Commit Graph

6662 Commits

Author SHA1 Message Date
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
Philip Chimento 837def66ac Apply suggestions from code review
Co-authored-by: Ioanna M Dimitriou H <9728696+ioannad@users.noreply.github.com>
2024-03-27 17:49:35 -07:00
André Bargull 71f95c29bd Add tests for resizable array buffer views
Covers spec compliance issues in at least one of JSC, V8, or SM.
2024-03-27 17:49:35 -07:00
Ben Allen 634933a489 DurationFormat: test formatting for units using combinations of "long", "short", and "narrow" styles 2024-03-27 09:49:09 -07:00
Ben Allen 86b6eee25b Correct Intl.DateTimeFormat and Intl.DisplayNames metadata incorrectly identifying tests for 'en' locale as tests for 'en-US' 2024-03-26 09:13:11 -07:00
Ben Allen 39168e26c8 DurationFormat: changed metadata to list 'en' instead of 'en-US' as locale for tests that actually test 'en' rather than 'en-US' 2024-03-25 15:36:57 -07:00
Kevin Gibbons decf9f2526 re-run rewrite scripts 2024-03-25 15:22:57 -07:00
Kevin Gibbons 927a70d4df fix typo in test name 2024-03-25 15:22:57 -07:00
Kevin Gibbons 4f7a43afbd add tests for get/setFloat16 2024-03-25 15:22:57 -07:00
Kevin Gibbons 435dcc9f6e tests for Math.f16round 2024-03-25 15:22:57 -07:00
Kevin Gibbons c1d09be840 add more cases for float16 coercions 2024-03-25 15:22:57 -07:00
Rezvan Mahdavi Hezaveh db7c0d1499 [explicit-resource-management] Add using in bytecode generator
This CL adds `using` to bytecode generator. This CL does not include exception handling and JSDisposableStack methods.
Also, since `using` and `const` have the same behavior (except for disposing resources), we add required checks to the existing code.

Bug: v8:13559
Change-Id: I1d169859cc2a3e16c7cc9078219d5e4a466f4560
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5270855
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#93014}
2024-03-25 19:18:58 +01:00
Kevin Gibbons 961480ac61 remove some auto-generated error messages in "assert.throws" tests 2024-03-25 12:09:10 +01:00
Kevin Gibbons 5424d7e834 rewrite tests to use verifyProperty 2024-03-25 12:05:06 +01:00
Ben Allen 0b1abd5ee7
Two tests previously assumed 'en' as locale for DurationFormat, assumption now made explicit (#4019) 2024-03-15 09:35:47 +01:00
Ben Allen af3890a10a update to reflect numeric minutes handling after https://github.com/tc39/proposal-intl-duration-format/pull/180 2024-03-13 12:00:37 +01:00
Kevin Gibbons 5132804523
add TypedArray feature to all new tests 2024-03-11 22:59:56 -07:00