Commit Graph

128 Commits

Author SHA1 Message Date
Chengzhong Wu 8a2229cde8
Add tests for Source Phase Imports (#3980) 2024-06-27 14:58:04 +02:00
Jordan Harband 8b6b0f516d
add Promise.try tests 2024-05-01 15:27:31 -07:00
Sosuke Suzuki d19cb1557c Fix `Array.groupBy` to `Object.groupBy` in `features.txt` 2024-04-01 12:27:52 -07:00
Kevin Gibbons 435dcc9f6e tests for Math.f16round 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
Cam Tenny 46871db0c2 Add feature for regular expression modifiers 2024-03-05 12:56:48 -08:00
Kevin Gibbons 718aa71683 Consolidate set methods features 2023-11-20 09:17:29 +01:00
Anthony Frehner 60310b70bc
Add Set.prototype.union tests (#3816)
* Beginning of adding Set.prototype.union tests

* Fix description

* Add tests for GetSetRecord

Which also allows Set-like objects

* Add title to test descriptions

* Add test for ensuring values are appended

* Add tests for properties of union

Also: tests for RequireInternalSlot, Constructor, BuiltIns.

Added a test to ensure that -0F is converted to +0F

* Ensure Set.prototype.add is not called as part of .union

* fix lint issues

* Set subclassing and Symbol.species tests

* Set.prototype.union tests for arrays and subclass methods

* Add the Set-methods frontmatter feature flag

* Add additional Set.prototype.union test for edge cases

* Update test/built-ins/Set/GetSetRecord/keys-is-callable.js

Co-authored-by: Kevin Gibbons <bakkot@gmail.com>

* Use compareArray() for assertions

* Remove class field syntax

* Remove unused args

* Update test/built-ins/Set/prototype/union/subclass-receiver-methods.js

Co-authored-by: Jordan Harband <ljharb@gmail.com>

* Return original 'add'

* address comments

* add one more mutation in the evil mutating iterator test

* address further comments

---------

Co-authored-by: Kevin Gibbons <bakkot@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: Ms2ger <Ms2ger@igalia.com>
2023-11-15 17:55:47 +01:00
Liviu Rau 8162f8c58f [test262] Add set method tests to staging
Reland https://crrev.com/c/4913993

This CL adds three tests from test methods tests to staging
directory with correct format.

Bug: v8:13556
Change-Id: I93817eb84e077436071dbae98bc800dd58851f91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4983674
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#90645}
2023-10-27 19:28:54 +02:00
Nicolò Ribaudo e15f566216 Add feature 2023-10-26 18:21:19 -07:00
Nicolò Ribaudo bf527dfa49 Move ES2023 features to "stable" list 2023-10-10 12:44:44 +02:00
Peter Klecha a2fb545892 Update features.txt
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2023-09-08 16:31:50 -07:00
Peter Klecha 81ba258677 add tests for Promise.withResolvers proposal 2023-09-08 16:31:50 -07:00
Rick Waldron dfc7ce4c28
Iterator Helpers (#2818)
drop:

property descriptor
name
length
[[Prototype]]
is a function
is not constructible
result instanceof Iterator
limit is given a non-primitive that needs to be converted to a number
  through valueOf
  through toString (array)
limit coercion to number throws
limit converts to NaN
  same as limit not supplied
limit behaves properly
  limit < number of values
  limit = number of values
  limit > number of values
gets the next method from the underlying iterator only once
underlying iterator has throwing next getter
underlying iterator next throws when advancing past dropped items
underlying iterator is advanced after calling drop
underlying iterator is closed after calling drop
underlying iterator is already closed
underlying iterator next returns non-object
underlying iterator next returns object with throwing done/value getters
underlying iterator return is never called when result iterator is closed

every:

property descriptor
name
length
[[Prototype]]
is a function
is callable
is not constructible
result is a Boolean
predicate is non-callable
iterator already exhausted
called on non-object
called on object with "next" method
called on object with non-callable "next" method
predicate returns non-Boolean
predicate returns truthy for all iterated values
  returns true
predicate returns truthy for some iterated values but then falsey for at least one iterated value
  returns false
  iteration stops
  iterator is closed
predicate returns falsey immediately
  returns false
  iteration stops
  iterator is closed
predicate throws
  every throws
  iterator is closed
predicate throws then iterator close also throws
predicate this value is undefined
predicate is passed the yielded value as the first parameter and a counter as second parameter
gets the next method from the iterator only once
iterator has throwing next getter
iterator has throwing return getter
iterator next throws
iterator return throws
iterator next returns non-object
iterator next returns object with throwing done/value getters

Co-authored-by: Michael Ficarra <mficarra@shapesecurity.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2023-06-15 17:07:41 +02:00
Jordan Harband 49237f30de Convert Array.prototype.group tests to Object.groupBy tests 2023-05-31 08:32:28 -07:00
Shu-yu Guo e0d4ca0577 Add JSON.parse with source feature tag 2023-03-27 16:27:51 -04:00
José Julián Espina 4a6439e4a7
Add `Array.prototype.includes` and `exponentiation` features (#3799) 2023-03-23 10:51:08 +01:00
Philip Chimento 5ea8322b08 Clarify feature flags are per proposal
As per discussion in https://github.com/tc39/test262/pull/3773
2023-03-06 17:31:20 +01:00
Philip Chimento 6bfcab1063 Remove unused "Intl.DateTimeFormat-quarter" feature flag
This was a needs-consensus PR that didn't reach consensus. The
corresponding tests were already removed in f7e6656c.

(Note, the link in the removed comment is wrong; it should point to
https://github.com/tc39/ecma402/issues/374)
2023-03-06 17:31:20 +01:00
Philip Chimento 7a5210deaf Clean up feature flags for proposals in published standard
This moves feature flags to the bottom section, for proposals that have
been included in a published revision of the standard (through ES 2022).
2023-03-06 17:31:20 +01:00
Shu-yu Guo ad034f3230 Update ArrayBuffer transfer feature flag 2023-01-25 14:10:04 -08:00
Jordan Harband 30a5b38f23 `String.prototype.isWellFormed`/`String.prototype.toWellFormed`: add tests 2022-12-01 16:04:31 +01:00
Philip Chimento dfb3593e3b Add feature flag for Array.fromAsync
Next proposal that the Igalia team plans to tackle is Array.fromAsync.
This adds the feature flag.
2022-11-15 10:15:25 +01:00
Nicolò Ribaudo 6f4601d095
Add "Change Array by Copy" tests (stage 3) (#3464)
Co-authored-by: Ashley Claymore <acutmore@users.noreply.github.com>
Co-authored-by: Tim Chevalier <tjc@igalia.com>
Co-authored-by: Ms2ger <Ms2ger@igalia.com>
2022-10-18 10:16:20 +02:00
Philip Chimento a10968b462 Add "Symbols as WeakMap keys" feature flag
See: #2850
2022-10-12 09:58:45 +02:00
Kevin Gibbons 52284ba4bb add tests for proposal-duplicate-named-capturing-groups 2022-08-09 12:15:49 -07:00
Yusuke Suzuki f74cee5f59 Rename Array#groupBy and Array#groupByToMap to Array#group and Array#groupToMap
TC39 decided to rename them to avoid web-compat issue[1].
This change follows to it.

[1]: https://github.com/tc39/proposal-array-grouping/pull/39
2022-08-03 13:29:11 -07:00
legendecas 6f8e0f67ca Decorators: add initial tests on class 2022-05-18 09:49:49 -04:00
legendecas d8fb00d741 Add missing feature flag array-grouping 2022-03-10 17:04:16 -05:00
Mathias Bynens 489a9f8d52 Add tests for \p{…} with properties of strings
This functionality is part of the RegExp `v` flag proposal: https://github.com/tc39/proposal-regexp-set-notation
2022-01-04 09:31:37 -05:00
Nikhil Singhal 1f16a6ad0e docs: update features 2021-12-03 19:53:31 -05:00
jugglinmike 19da3ca075
Add reference for feature flag (#3297) 2021-11-04 12:03:33 -07:00
Rick Waldron b1f3390fe4
Features: remove duplicate "cleanupSome" feature (#2892)
* Features: remove duplicate "cleanupSome" feature

* Replace feature flag in harness file

Co-authored-by: Mike Pennisi <mike@mikepennisi.com>
2021-11-04 13:27:30 -04:00
Mike Pennisi 057c8acec7 Add tests for "Intl NumberFormat v3" proposal
This patch is intended to cover only one aspect of the proposal for
ECMA402: the "rounding mode" feature.
2021-11-01 12:50:38 -04:00
rwaldron 4a55a4f67a fix: rename feature tag from "callable-boundary-realms" -> "ShadowRealm"; rename built-ins/Realm -> built-ins/ShadowRealm 2021-09-02 10:46:33 -04:00
Frank Yung-Fong Tang 73dc6f3714 Add Intl-enumeration 2021-08-11 12:03:59 -04:00
rwaldron 4b54d54113 Fix copyrights and features metadata 2021-07-28 13:53:12 -04:00
rwaldron f5fd1af49f features.txt: callable-boundary-realms 2021-07-21 09:21:09 -04:00
rwaldron 991a38932a Fix features.txt order 2021-07-16 10:02:41 -04:00
jugglinmike afe217b318
Add tests for "Class Static Init. Blocks" proposal (#2968)
* Add tests for "Class Static Init. Blocks" proposal

This proposal is currently at "stage 3" in TC39's standardization
process.

* fixup! Add tests for "Class Static Init. Blocks" proposal

* Correct identifier reference

* Update tests for grammar

* Update tests for identifiers

* Add tests for scope derivation
2021-07-15 08:49:12 -04:00
Mike Pennisi 802f22bf0e Temporal.now.timeZone: improve coverage 2021-06-25 13:52:57 -04:00
jugglinmike b3c2d3a88e
Resizable ArrayBuffer: ArrayBuffer constructor (#3018)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: ArrayBuffer constructor
2021-06-25 13:18:42 -04:00
Frank Yung-Fong Tang c8d75c3681
Add feature values for ECMA402 Stage 3 proposals (#3012) 2021-06-24 13:50:00 -04:00
Jamie Kyle bad7c0487e
Add tests for Object.hasOwn (#2995)
* Add tests for Object.hasOwn

* Update test/built-ins/Object/hasOwn/length.js

Co-authored-by: Jordan Harband <ljharb@gmail.com>

* Update test/built-ins/Object/hasOwn/name.js

Co-authored-by: Jordan Harband <ljharb@gmail.com>

* Fixup comments for Object.hasOwn

* Add Object.hasOwn descriptor test

* use assert.sameValue with true instead of assert()

* remove extra semicolons

* Remove old $ERROR style tests from hasown

* Fix thrown error type in hasown tests

* Fix incorrect test cases

Co-authored-by: Jordan Harband <ljharb@gmail.com>
2021-06-16 17:35:06 -04:00
Mike Pennisi 56ca8add7d Update project structure to support non-JS files
This change is in service of forthcoming tests for the "JSON modules"
language proposal [1]. Verifying the semantics of that proposal requires
modules whose source text is not valid ECMAScript; this change updates
the guidelines for contributing and interpreting tests so that such test
material can be handled consistently.

Differentiating JSON files with a distinct file name suffice will assist
consumers which require special handling of such files (e.g. web
browsers).

Change the pattern used to designate "fixture" files so that it may be
applied to files used for JSON modules.

Increment the project version number to alert consumers of this change
in interpreting instructions.

[1] https://github.com/tc39/proposal-json-modules
2021-05-28 20:02:59 -04:00
Ujjwal Sharma 5e0fc43c66
Add basic tests for proposal-intl-locale-info (#2987)
* Add basic tests for weekInfo

* Add basic tests for textInfo

* Add basic tests for timeZones

* Add basic tests for numberingSystems

* Add basic tests for hourCycles

* Add basic tests for collations

* Add basic tests for calendars

* Add feature for Intl.Locale-info

* add validation to branding tests for locale-info

Add additional assertion to branding tests for proposal-intl-locale-info
to make sure they don't pass spuriously when the proposal is not
implemented.
2021-05-18 22:40:08 -04:00
Mike Pennisi 18834b2e19 Add tests for import assertions 2021-05-14 11:04:29 -04:00
Shu-yu Guo 70bc32edab
Give Error cause tests the error-cause feature tag (#2977) 2021-04-23 15:53:14 -07:00
jugglinmike 61c6f8214b
Add tests for stage 3 proposal "private fields in" (#2963) 2021-04-19 07:50:52 -07:00
Ross Kirsling df1bce9c2e Rename item() to at(). 2020-11-18 13:31:11 -05:00