Commit Graph

5198 Commits

Author SHA1 Message Date
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 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
Luis Fernando Pardo Sixtos 2e1843d0a5 [decorators] Support public auto-accessors
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}
2024-08-22 20:23:01 +02:00
Richard Gibson b70b75793d Test `await` in ConditionalExpression 2024-08-21 10:19:55 +02:00
Michael Ficarra 22967c5b7b Math.sqrt: add a test with exact input-output expectations 2024-08-20 10:29:05 -07:00
José Julián Espina dde3050bdb
Fix test regression in asyncHelpers.js (#4197) 2024-08-19 12:33:17 -04:00
Ms2ger 941813e1f0 Revert "Revert "Add invalid index Reflect.set tests""
This reverts commit b110681292.
2024-08-16 17:26:15 +02:00
Ms2ger 79faa2252a Revert "Revert "Add invalid index prototype chain [[Set]] tests""
This reverts commit 3d77404e4f.
2024-08-16 17:26:15 +02:00
Ms2ger 44685c14d7 Revert "Revert "Add valid index Reflect.set tests""
This reverts commit b90326d9a4.
2024-08-16 17:26:15 +02:00
Ms2ger efa4272ffb Revert "Revert "Add valid index prototype chain [[Set]] tests""
This reverts commit bd65623af6.
2024-08-16 17:26:15 +02:00
Ioanna M Dimitriou H 224c5c3cb9
RAB: Integrate staging tests for the .subarray method (#4177)
* Import relevant files from #3888

* Adds resizableArrayBufferUtils.js to includes and removes its content from each test

* renamed tests to indicate the end argument is tested too

* Adds more tests for the 'end' argument of .subarray
2024-08-15 15:13:34 -07:00
Philip Chimento cb4a6c8074 Temporal: Add a test for a coverage gap in Duration.prototype.round
See https://github.com/tc39/proposal-temporal/issues/2919; this adds test
coverage that would have caught an unintentional normative change.
2024-08-15 10:26:58 +02:00
Ioanna M Dimitriou H b1d0933df5
RAB: Integrate staging tests for the .toLocaleString method (#4178)
* 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.

* Apply suggestions from code review

* Address review: get implementation dependent toLocaleString separator.

* Apply suggestions from code review
2024-08-14 12:30:54 -07:00
Linus Groh 984df1f3db Remove unused harness/timer.js 2024-08-14 08:37:46 -07:00
Ioanna M Dimitriou H 12307f5c20
RAB: Integrate staging tests for the .slice method (#4174)
* 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.

* Add coerced-start-shrink test for Array.p.slice

* Renames files to add more tests for the end argument of .slice.

* Tests for the 'end' argument of .slice and test file for Array.p.slice
parallel to TypedArray.p.slice resizable-buffer.js
2024-08-13 17:03:51 -07:00
Luis Fernando Pardo Sixtos 2020cfbe66 [decorators] Support private auto-accessors
Support for the accessor keywords for private class fields as part of
the decorators proposal.

Changes to AST:

- Add an AUTO_ACCESSOR value to the ClassLiteralProperty::Kind enum.
- Add an AutoAccessorInfo class to be used in ClassLiteralProperty
  objects of kind AUTO_ACCESSOR to hold the information about the
  generated getters/setters and backing storage.
- Add AutoAccessorGetterBody and AutoAccessorSetterBody statements to
  implement the logic of generated getters and setters.

Changes to Parser:
- Add logic to parse the "accessor" keyword and throw when used on non
  field class properties.
- Add preparser logic to mock the function scopes and variable
  declarations required for the generated getters/setters.
- Add parser logic to synthetically create statements for the
  generated setters/getters. 

Changes to the Bytecode Generator:
- Add logic to BuildClassLiteral to build auto accessor storage
  private names.
- Add logic to set the generated getters/setters in the accessor pair.
- Add logic to initialize the accessor storage in BuildClassProperty.
- Add AutoAccessorGetterBody and AutoAccessorSetterBody visitors.

Tests:
- Add parsing-unittests for parsing converage.
- Add test262 tests for functionality coverage.
- Add test-debug test for devtools support coverage.

Bug: 42202709
Change-Id: Ibb9bee3bbd0c09341108856f969e0c22bbb8b9cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5547688
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Commit-Queue: Luis Pardo <lpardosixtos@microsoft.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#95612}
2024-08-13 19:35:08 +02:00
Ioanna M Dimitriou H bcb42e339d
RAB: Integrate staging tests for the .some method (#4175)
* 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.

* Address review comments.
2024-08-09 09:05:04 -07:00
Marko Lahma 5dc04b7332 Fix TypedArray.reduce tests against RAB
* reduce callback has call signature «accumulator, kValue, 𝔽(k), O »
2024-08-06 15:15:19 -07:00
Ioanna M Dimitriou H dc36c7eae9
RAB: Integrate staging tests for the .values method (#4179)
* 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 unnecessary .from calls, as suggested in previous PR review
comment: https://github.com/tc39/test262/pull/4138#discussion_r1676183221
2024-08-05 17:26:21 -07:00
Ioanna M Dimitriou H ef72bd1c44
RAB: Integrate staging tests for the .sort method (#4176)
* 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.

* Renamed test files

* Some minor documentation fixes and removing onlyStrict flag
2024-08-05 17:22:10 -07:00
Ioanna M Dimitriou H c0942e0883
RAB: Integrate staging tests for the .set method (#4173)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
and renaming helper function.
2024-08-05 14:09:41 -07:00
Aurèle ea37a19a4a
Add tests for nullable quantifiers in RegExps (#4185)
* Add tests for nullable quantifiers in RegExps

The JavaScript semantics for a quantifier matching the empty
string are different from other regex languages.
This adds a test that documents this JavaScript-specific
behavior.

This is part of my work at the SYSTEMF lab at EPFL.

* Update nullable-quantifier.js
2024-08-05 13:02:50 -07:00
Lucas Mirelmann 5492929d55 Fix typo
Fix typo in an ObjectLiteral
2024-08-01 16:06:56 +02:00
Sosuke Suzuki 616dcadff4 Fix escaped `a` 2024-07-30 10:01:51 +02:00
Ioanna M Dimitriou H 1842afcbce
RAB: Integrate staging tests for the .reduce method (#4156)
* 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' test for Array.prototype.reduce

* Deleted accidental files

* Fix accidental call of .map instead of .reduce

Addresses review comments

* fix copyright in new file not in origin PR
2024-07-29 17:33:50 -07:00
Ioanna M. Dimitriou H 6add1a22cd adds features: [explicit-resource-management] flag 2024-07-29 16:31:26 -07:00
Ioanna M. Dimitriou H e612296c41 Changed two files to use verifyProperty. 2024-07-29 16:31:26 -07:00
Ioanna M. Dimitriou H 435a89b702 Address review comments and fixes some more descriptions
- Fixes to two tests testing Map.prototype.size
- Description fixes
2024-07-29 16:31:26 -07:00
Ron Buckton cb8324fdba Adds [is/not]-a-constructor.js tests from @rbuckton's PR #3866
to make reviewing easier.
2024-07-29 16:31:26 -07:00
Ron Buckton c916d81d85 Adds .length property descriptor tests for explicit resource management
These are all the length.js tests from @rbuckton's PR #3866 to make reviewing easier.
2024-07-29 16:31:26 -07:00
Ron Buckton 59657217f1 Adds .name property descriptor tests for explicit resource management
These are all the name.js tests from @rbuckton's PR #3866 to make reviewing easier.
2024-07-29 16:31:26 -07:00
Ioanna M. Dimitriou H 8996664a42 Added expected esid's 2024-07-29 16:31:26 -07:00
Ron Buckton 3a615a0c0e Adds property descriptor tests for explicit resource management objects
These are all the prop-desc.js tests from @rbuckton's PR #3866 to make reviewing easier.
2024-07-29 16:31:26 -07:00
Philip Chimento 3b89be9c5d Temporal: Fix Japanese era test
This mistakenly used a previous name for the helper function. Also adds
a couple of debugging messages.
2024-07-29 14:17:24 +02:00
Ioanna M Dimitriou H 242f6f98f0
RAB: Integrate staging tests for the .map method (#4155)
* 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.

* Apply suggestions from code review
2024-07-25 16:04:41 -07:00
André Bargull 7f81bb2126 Allow canonical era codes for Japanese era test 2024-07-25 11:59:15 -07:00
André Bargull a238ad6a1e Move test for dates before start of the Japanese era into a new file
See also <https://github.com/tc39/proposal-temporal/issues/2865>
requesting for more information how this case should actually be
handled.
2024-07-25 11:59:15 -07:00
André Bargull dcaed0523c Allow implementation-defined behaviour for constraining leap months 2024-07-25 11:46:15 -07:00
Ioanna M Dimitriou H 18ebac8122
RAB: Integrate staging tests for the .reverse method (#4160)
* 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-24 16:55:16 -07:00
Ioanna M Dimitriou H 1dd1b91d14
RAB: Integrate staging tests for the .reduceRight method (#4157)
* 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' test for Array.prototype.reduceRight
2024-07-24 16:39:27 -07:00
Frank Tang 12416e0fa9 Add tests for DurationFormat PR 172 and 167
Test the order of resolvedOptions in default setting
Also add test to check the reading order of options based on the
property returned in the default setting resolvedOptions.

https://github.com/tc39/proposal-intl-duration-format/pull/167
https://github.com/tc39/proposal-intl-duration-format/pull/172
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions

These two PRs are presenting to TC39 2023-09 meeting

Swap actual/expected order

Update test/intl402/DurationFormat/constructor-option-read-order.js

Co-authored-by: André Bargull <andre.bargull@gmail.com>

Fix per anba suggestion
2024-07-24 15:47:38 -07:00
Timothy Flynn d8aa2e4ef7 Update NumberFormat.prototype.useGrouping test for CLDR 45
In CLDR 45, in the en-IN locale, the compact thousands symbol changed
from 'T' to 'K' after a survey was conducted in India:

b8d4472975
2024-07-24 08:53:41 -07:00
Ioanna M Dimitriou H ba92881748
RAB: Integrate staging tests for the .length method (#4154)
* Import relevant files from #3888

* Adds resizableArrayBufferUtils.js to includes and removes its content
from each test. Also splits tests for .byteLength and .byteOffset to
new files in the respective directories.

Test lines calling .buffer in .../length/resizable-buffer-assorted.js
were not split to .../buffer/ as they seem to only do a check for the
test on .length but perhaps they need to be also split to a new file
.../buffer/resizable-buffer-assorted.js
2024-07-23 16:42:45 -07:00
Leo Balter 880f8a5ba6 Add tests for RegExp.escape 2024-07-18 17:30:09 +02:00
Sosuke Suzuki d09ecdb57b Use spaces instead of tabs 2024-07-18 12:12:03 +02:00
Ioanna M Dimitriou H 63e81baf5b
RAB: Integrate staging tests for the .lastIndexOf method (#4153)
* 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.

* Some changes for readability.
2024-07-17 17:37:17 -07:00
Ioanna M Dimitriou H 97cf4fd6e9
RAB: Integrate staging tests for the .keys method (#4138)
* 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 redundant documentation

* Address review comments.
2024-07-16 09:25:18 -07:00
magic-akari 03ade8b46a
Add missing test for `Math.pow(1, NaN)` (#4149) 2024-07-15 13:58:33 +02:00