6699 Commits

Author SHA1 Message Date
Philip Chimento
f4a987fe3c Temporal: Additional tests for cases where date addition goes out of range
See tc39/proposal-temporal#2985
2024-10-03 12:14:41 +02:00
Philip Chimento
326cdb8da8 Temporal: Consistently test all string entry points for representable range
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
2024-10-03 12:14:41 +02:00
Philip Chimento
116bc2cc47 Temporal: Move UTC offset ±24:00 into invalid string tests
It was in the "limits of representable range" tests, but it is invalid
syntax, so it belongs somewhere else.
2024-10-03 12:14:41 +02:00
Richard Gibson
585d7ac2b3 Test TypedArrays with excess bytes in their underlying buffers 2024-10-02 16:38:41 -07:00
Huáng Jùnliàng
1a0aa3b866 fix: syntax error in DisposableStack test 2024-09-27 15:29:36 +02:00
Linus Groh
f1a670ff59 Fix compareArray.js harness tests
Also a typo in one of the messages.
2024-09-27 11:43:57 +02:00
Marko Lahma
72ff7d1269 Add names for expected outcomes in compareArray.js 2024-09-25 14:02:32 -07:00
Philip Chimento
0c784ef954 Remove async-gc harness
This is now unused, and there is no way to implement it without using the
cleanupSome proposal (see previous commit) which has been withdrawn.

Closes: #3920
2024-09-25 10:06:15 -07:00
Philip Chimento
f225229f85 Remove FinalizationRegistry tests that depend on nondeterministic GC
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.
2024-09-25 10:06:15 -07:00
Philip Chimento
77b1c787e8 Remove WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js
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.
2024-09-25 10:06:15 -07:00
Philip Chimento
3bed2c446f Remove tests for FinalizationRegistry.prototype.cleanupSome
This proposal was split off from FinalizationRegistry at stage 2, and then
withdrawn. Given that status, it should not be part of the test suite.
2024-09-25 10:06:15 -07:00
SkyCrystal
957ab22773
Add a test for Generator (#3729) 2024-09-25 12:58:24 -04:00
Ioanna M Dimitriou H
c63d53ad9c
Builtin boilerplate tests from PR #3866 (#4236)
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>
2024-09-24 14:04:28 +02:00
Richard Gibson
0c7af4685f harness/propertyHelper.js: Check the new property value chosen by isWritable for collision 2024-09-23 15:14:59 -07:00
Richard Gibson
07a2c2501e harness/propertyHelper.js: Capture primordials that might be affected at runtime by verification
Ref https://github.com/tc39/test262/pull/4234#discussion_r1771684267
2024-09-23 15:14:59 -07:00
Shu-yu Guo
fcfb11da77 Remove test for old behavior for Atomics.pause 2024-09-20 15:34:26 -07:00
tannal
474af83250 Add more tests for v flag 2024-09-20 11:10:54 -07:00
Ron Buckton
dc7a22dd28 Function branding boilerplate tests from PR #3866 2024-09-20 10:48:23 -07:00
Philip Chimento
e46b317b18 Temporal: Add test coverage for canonicalizing era codes in from()
There was a coverage gap for converting calendar fields to a date when the
provided era was an alias.

See https://github.com/tc39/proposal-temporal/pull/2940#discussion_r1767508659
2024-09-20 17:04:19 +02:00
André Bargull
18ae34d8f2 Improve coverage for reference type in various contexts
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-*
2024-09-20 16:00:53 +02:00
Richard Gibson
de3a117f02 Temporal: Update tests to account for use of year in ToTemporalMonthDay
Ref https://github.com/tc39/proposal-temporal/issues/2863
Normative PR: https://github.com/tc39/proposal-temporal/pull/2940
2024-09-19 11:27:48 -07:00
Rezvan Mahdavi Hezaveh
dfece8cfc5 [explicit-resource-management] Add test for async generator body
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}
2024-09-17 22:20:04 +02:00
André Bargull
867ca540d6 Add test coverage for correct binding object MOP executions in with-environment 2024-09-13 12:28:45 -07:00
SUZUKI Sosuke
8cbcc309e6
Add tests for %WrapForValidIteratorPrototype%.return() from Iterator Helpers Proposal (#4214)
* 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
2024-09-13 11:41:43 -07:00
Mathias Bynens
77e98fb683 Add tests for Unicode v16 property escapes
Issue: https://github.com/tc39/ecma262/issues/3425
2024-09-13 14:42:42 +02:00
Mathias Bynens
83c58c5055 Move updated unicodeSets tests to their appropriate location 2024-09-13 14:38:51 +02:00
Mathias Bynens
4bdf978220 Add tests for Unicode v16 Identifier{Start,Part}
Issue: https://github.com/tc39/ecma262/issues/3425

.
2024-09-12 08:48:21 -07:00
Shu-yu Guo
a9c1c08852
Migrate resizable buffer tests out of staging (#3888)
Co-authored-by: Ioanna M Dimitriou H <idimitriou@igalia.com>
2024-09-12 11:26:33 +02:00
Paul Bakker
98c7e9114e
Test computed accessor properties and AggregateError constructor without arguments (#4222) 2024-09-11 11:41:07 +02:00
Philip Chimento
70cdc562e3 Temporal: Adjust era code of Japanese pre-Meiji era
As of the current state of the Intl Era and Month Codes proposal,
https://tc39.es/proposal-intl-era-monthcode/#sec-temporal-canonicalizeeraincalendar
the canonical name of this era is "japanese".

See: https://github.com/tc39/proposal-temporal/issues/2901
2024-09-10 09:28:24 -07:00
Philip Chimento
6f8f6b5261 Temporal: Tests for ignoring era and eraYear in calendars without eras
This tests some of the prose requirements of CalendarResolveFields.

See https://github.com/tc39/proposal-temporal/issues/2870
2024-09-10 09:28:24 -07:00
Aapo Alasuutari
cff5a6012f
fix: Use Object.getPrototypeOf to get prototype in __proto__-fn-name.js (#4205) 2024-09-09 14:37:00 +02:00
Philip Chimento
d9b10790bc Temporal: Tests for corner case in TZDB involving DST transition in 1919
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
2024-09-05 15:19:17 -07:00
Philip Chimento
c93ae0ac2f Temporal: Tests for disallowed corner case in rounding durations
This test covers a normative change to disallow an ambiguous corner case
in the options bag for Temporal.Duration.prototype.round().

See https://github.com/tc39/proposal-temporal/pull/2916
2024-09-05 15:08:08 -07:00
Ioanna M Dimitriou H
fc49c9ce16
Move function MayNeedBigInt to RAB helper file and inline WriteToTypedArray. (#4211) 2024-09-03 16:23:23 +02:00
Nicolò Ribaudo
d012a4d0ef
Add test for asi between get/set field and generator (#4189)
Co-authored-by: André Bargull <andre.bargull@gmail.com>
Co-authored-by: Linus Groh <mail@linusgroh.de>
2024-09-02 17:39:12 +02:00
Rezvan Mahdavi Hezaveh
d62fa93c8f [explicit-resource-management] Complete exception handling
This CL completes the exception handling (promise rejection) for
async explicit resource management.

Bug: 42203814
Change-Id: Ide4f05df14f74e68b7aa120230f1b1ae33ce8adc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5692882
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#95748}
2024-08-28 19:39:52 +02:00
Rezvan Mahdavi Hezaveh
6c1116d45f
Merge pull request #4145 from tc39/chromium-export-99eec8f4a2
[explicit-resource-management] Add await using to the bytecode generator
2024-08-28 09:58:46 -07:00
Rezvan Mahdavi Hezaveh
9f94490ff1
Merge branch 'main' into chromium-export-99eec8f4a2 2024-08-28 09:51:29 -07:00
Rezvan Mahdavi Hezaveh
b69e9d5e72 [explicit-resource-management] Add AsyncDisposableStack builtins
This CL adds builtin methods for developer exposed
AsyncDisposableStack object.

Bug: 42203814
Change-Id: I1f16a3bcb80c71a4f33e4ae028f1737c3502dabe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5715141
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#95838}
2024-08-27 21:23:09 +02:00
Ioanna M Dimitriou H
3acb672d11
RAB: Integrate helper to rest of the tests (#4198)
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-08-27 17:18:44 +02:00
André Bargull
a4443793b9 Add coverage when array buffer is resized in SetTypedArrayFromArrayLike 2024-08-27 15:24:28 +02:00
André Bargull
18c8c85746 Add more tests for deleted bindings in object environments 2024-08-27 15:24:28 +02:00
André Bargull
b9ed8c920c Add more tests for typed array indices in typed array set 2024-08-27 15:24:28 +02:00
Philip Chimento
ea11e0e787 Temporal: Further coverage and tweaks for removing Calendar/TimeZone objs
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
2024-08-22 14:00:43 -07:00
Jonatan Klemets
b3d690e47b Remove import-assertions from features.txt 2024-08-22 12:19:08 -07:00
Jonatan Klemets
0661aecf7d Replace reference to import-assertions in rfcs/async-helpers.md 2024-08-22 12:19:08 -07:00
Jonatan Klemets
3b4d9f53b5 Remove README about keeping import-assertions tests in sync 2024-08-22 12:19:08 -07:00
Jonatan Klemets
3b56bf655f Remove generated import-assertions test files
Generated by running `./make.py clean` and `./make.py`
2024-08-22 12:19:08 -07:00
Jonatan Klemets
cfd81e1698 Remove import-assertions test files 2024-08-22 12:19:08 -07:00