* Add tests to `Intl.DateTimeFormat` and `Intl.RelativeTimeFormat` for formatting in various numbering systems
* fixup! Add tests to `Intl.DateTimeFormat` and `Intl.RelativeTimeFormat` for formatting in various numbering systems
* Temporal: Move most tests out of total.js under staging into separate files under test/built-ins
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
Add source phase import support in import calls with necessary
embedder APIs. When a imported module does not support source phase
representation, a ReferenceError is thrown in d8.
Bug: 42204365
Change-Id: If40cadfcdf0a547f24d20c67149bba559480341d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5878343
Commit-Queue: Chengzhong Wu (legendecas) <legendecas@gmail.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#96473}
See tc39/proposal-temporal#2795. When attempting to format a Temporal
object, if the DateTimeFormat has options that do not overlap with the
data model of the Temporal object, toLocaleString() and format() are
supposed to throw a TypeError.
These staging tests are incorrect. See tc39/proposal-temporal#2795. This
was an unintended behaviour. It differed from the behaviour for dateStyle
and timeStyle, which was the intended behaviour.
Adds a test for each Temporal object's toLocaleString() method, formatting
them with only one option e.g. { year: 'numeric' } and comparing it with
the corresponding output for legacy Date.
See tc39/proposal-temporal#2796.
Syntax is validated first. Only after the property bag is fully converted
into a Calendar Fields Record does the time zone validate whether the UTC
offset is correct for that exact time in the time zone.
See tc39/proposal-temporal#2962
Syntax is validated first. Only after the property bag is fully converted
into a Calendar Fields Record does the calendar validate whether the month
code actually exists in the year.
See tc39/proposal-temporal#2962
Remove the existing "instant-string-limits.js" that only applied to APIs
where ToTemporalInstant was called. Add "argument-string-limits.js" tests
everywhere ISO strings are converted.
Related to tc39/proposal-temporal#2985
In these tests, cleanupSome() would have optionally emptied the
FinalizationRegistry synchronously and called the finalization callbacks.
Without cleanupSome(), there is no way to observe a FinalizationRegistry
being emptied using "pure" ECMAScript: FinalizationRegistry doesn't get
cleaned up until the microtask queue is empty, and without external APIs
such as setTimeout() there is no way to pause execution until after the
microtask queue is empty.
Non-deterministic tests are not that useful anyway; these tests are
probably better left to implementations' internal testing strategies.
On all engines that still support cleanupSome, this test was hitting the
asyncGC.notCollected check in resolveAsyncGC(). That means that it was
just skipped, and the deref() part was never actually executed.
Given that it is not testing anything in practice, remove it.
Includes some proto-from-ctor-realm.js tests that look like standard tests for prototypes.
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
Missing coverage encountered while implementing
<https://github.com/tc39/ecma262/pull/3307> in SpiderMonkey.
Ensure environment lookups are performed in the correct order:
- keyed-destructuring-property-reference-target-evaluation-order-with-bindings.js
Ensure `delete super[elem]` steps are correctly performed:
- delete/super-property-topropertykey.js
- delete/super-property-uninitialized-this.js
Ensure ToPropertyKey for computed property names in object literals
correctly performed:
- object/computed-property-name-topropertykey-before-value-evaluation.js
Ensure `GetSuperBase` is executed before `ToPropertKey`:
- super/prop-expr-getsuperbase-before-topropertykey-*
Ensure `GetThisBinding` is executed first:
- super/prop-expr-uninitialized-this-*
This cl adds a test for having `await using` in the async
generator function body.
Bug: 42203814
Change-Id: I30c0d2fe354a3047f67a4a71f7c6472c3d832bbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5867651
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#96146}
* Add tests for `%WrapForValidIteratorPrototype%.return()`
* Address review
- Remove unused `flags
- Do not use `deepEqual.js`
- Assert `return` never got when `this` value is invalid
- Use `TemporalHelpers` to observer get / call
These tests add coverage for a corner case in the TZDB. In spring 1919,
the America/Toronto time zone switched to DST at 23:30 on March 30th,
skipping an hour ahead to 00:30 on March 31st. This meant that both March
30th and March 31st were 23.5-hour days.
See: https://github.com/tc39/proposal-temporal/issues/2910
Tweak some tests to provide coverage of new execution paths in the spec,
such as calling GetOptionsObject inside ToTemporal___; add a few new tests
for things that weren't covered before, such as rounding a PlainDateTime
at the edge of the range; and tweak the tests verifying when the
properties of the options bag are read, which I made a mistake in #4119.
See: https://github.com/tc39/proposal-temporal/pull/2925
Add support for the accessor keywords for public class fields as part of the decorators proposal.
Changes to the parser:
- Minor cleanup of reused code.
- Support declaration of public auto-accessors.
Changes to the bytecode generator:
- Add logic to create the accessor storage private name for public
members.
- Add the generated getter and setter to the arguments list passed to
Runtime::kDefineClass
Changes to class boilerplate:
- Add logic to add a template AccessorPair to the descriptors lists
for each auto accessor property. The template AccessorPair object
is initialized with consecutive indices corresponding to the
positions in the Runtime::kDefineClass arguments.
Add tests.
Bug: 42202709
Change-Id: I2253eddb734e950d8faf83fff1763e32b7f53a73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5745256
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Commit-Queue: Luis Pardo <lpardosixtos@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#95784}