Commit Graph

6146 Commits

Author SHA1 Message Date
Mathias Bynens d361217eb7 Add tests for RegExp set notation
Set notation and extended character class functionality is part of the RegExp `v` flag proposal: https://github.com/tc39/proposal-regexp-set-notation

Issue: https://github.com/tc39/test262/issues/3496, https://github.com/tc39/proposal-regexp-set-notation/issues/52
2022-07-12 19:21:53 -07:00
Ms2ger b8d4c12698 Temporal: Add test for custom fields in PlainDate.from. 2022-07-11 13:40:24 -07:00
Aditi caaeb2bc90 Replace %%%conversion_target%%% with PlainDate 2022-07-11 15:32:23 +02:00
Ms2ger 3ddfa0cd13 Temporal: Test that Calendar#dateAdd is called with the correct arguments. 2022-07-04 11:30:02 -06:00
Yusuke Suzuki b2b6756044 Fix useGrouping tests based on the latest Intl.NumberFormat v3 change
Based on discussion[1], useGrouping computation in Intl.NumberFormat v3 is updated[2] to keep web compatibility.
This change fixes the existing test which is testing the previous behavior.

[1]: https://github.com/tc39/proposal-intl-numberformat-v3/issues/74
[2]: d13bd63f8f
2022-07-04 11:13:37 -06:00
dnalborczyk 1b3bddbeff Fix spelling in test description 2022-07-04 09:40:40 +02:00
Philip Chimento 704c9cea9c Temporal: Test validation of overflow option for conversion fast paths
A normative change that reached consensus at the June 2022 TC39 meeting
was this small change to throw on an invalid value for the overflow option
in PlainDate.from() and PlainDateTime.from(), in the case of a fast-path
conversion.

See https://github.com/tc39/proposal-temporal/pull/2225
2022-07-01 10:29:18 +02:00
Romulo Cintra 392f0049d7 test invalid negative durations objects 2022-07-01 09:26:43 +02:00
Philip Chimento f6179a6eb6 Temporal: Test observable calendar.mergeFields() calls with null-prototype objects
As of https://github.com/tc39/proposal-temporal/pull/2219 the arguments to
the calendar.mergeFields() methods should be null-prototype objects when
called from with() and toPlainDate() methods. This adds tests for that
behaviour.
2022-06-27 13:51:58 +02:00
Philip Chimento f314ecb9f4 Temporal: Test observable calls on fields object from PrepareTemporalFields
As of https://github.com/tc39/proposal-temporal/pull/2219 the object
returned from the PrepareTemporalFields abstract operation should be a
null-prototype object. There are a number of places where this is
observable in one of the calendar's ...FromFields() methods. This adds
tests for this behaviour everywhere it is observable.
2022-06-27 13:51:58 +02:00
Philip Chimento ca74e801b2 Temporal: Test observable calendar.yearMonthFromFields() calls with null-prototype options
As of https://github.com/tc39/proposal-temporal/pull/2219 PlainYearMonth's
add() and subtract() methods should be calling the calendar's
yearMonthFromFields() method with a null-prototype object as the options
parameter, due to the change in
AddDurationToOrSubtractDurationFromPlainYearMonth. This adds a test for
this behaviour.
2022-06-27 13:51:58 +02:00
Philip Chimento 0c33b09337 Temporal: Test observable calendar.dateUntil() calls with null-prototype options
As of https://github.com/tc39/proposal-temporal/pull/2219 since() and
until() methods should be calling the calendar's dateUntil() method with a
null-prototype object as the options parameter, due to the change in
MergeLargestUnitOption. This adds a test for this behaviour.
2022-06-27 13:51:58 +02:00
Ms2ger 5e564b96e7 Temporal: Fix typo in description. 2022-06-25 19:56:03 +02:00
Ms2ger 079a7eac7a Temporal: Fix typo in ZonedDateTime/from/offset-wrong-type.js. 2022-06-25 19:55:37 +02:00
Ms2ger 8123e8fc34 Temporal: Add missing Number checks in overflow-wrong-type.js. 2022-06-25 19:54:57 +02:00
Romulo Cintra b458b9f0c2 Update harness/testIntl.js
thks

Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2022-06-23 16:15:30 -04:00
Romulo Cintra 2877facc4c Update testIntl.js
Add NS digit mappings
2022-06-23 16:15:30 -04:00
Romulo Cintra 0efbba27ff Normative: Add new numbering system "tnsa"
Add [tnsa](https://github.com/unicode-org/cldr/blob/main/common/bcp47/number.xml#L95) to number systems
2022-06-23 16:15:30 -04:00
legendecas ee521159d5 Fix decorator tests 2022-06-23 15:17:43 -04:00
Philip Chimento babd46c40a Add tests for Temporal.Instant strings at the edge of the range
This adds tests for a normative change which reached consensus in the June
2022 TC39 meeting, ensuring that the representable range of
Temporal.Instant is always the same regardless of which time zone offset
is used when converting from a string.

See: https://github.com/tc39/proposal-temporal/pull/2189
2022-06-22 09:28:14 +02:00
Ms2ger 81836ba124
Temporal: Test PlainDate#{add,subtract} with custom calendar. 2022-06-21 16:26:58 +02:00
Youssef Soliman 79c4496559 Fixed spelling error identifer -> identifier. 2022-06-21 10:14:17 +02:00
Ms2ger b1020c50b7
Temporal: Extend PlainDate#toPlainDateTime coverage. (#3582) 2022-06-20 07:33:59 -07:00
Ms2ger 65e75e4eed
Temporal: Extend PlainDate#{since,until} coverage. (#3581) 2022-06-20 06:47:09 -07:00
Ms2ger d5b2c706cf Update test/built-ins/Temporal/PlainDate/prototype/with/custom.js 2022-06-20 15:30:02 +02:00
Ms2ger 8eadab4d0b Update test/built-ins/Temporal/PlainDate/prototype/with/custom.js 2022-06-20 15:30:02 +02:00
Ms2ger bdd4bfa619 Update test/built-ins/Temporal/PlainDate/prototype/with/calendar-invalid-return.js
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2022-06-20 15:30:02 +02:00
Ms2ger 1a9f64cda3 Temporal: Extend PlainDate#with coverage. 2022-06-20 15:30:02 +02:00
Ms2ger 9762bc991f Temporal: Make branding tests more robust. 2022-06-20 13:14:35 +02:00
Ms2ger 080e893e21 Temporal: Standardize branding tests. 2022-06-20 13:14:35 +02:00
snek 74656ae4ec reenable graaljs 2022-06-20 09:59:59 +02:00
Mike Pennisi 74de3d1d32 Correct spurious syntax errors
Prior to this commit, two tests for specific early errors also included
syntactically invalid `const` declarations. Implementations which
produced the expected syntax error due to these invalid declarations
would pass the tests regardless of whether they produced the early
errors that the tests were written to verify.

Correct the `const` declarations so that the tests verify the parsing
rule that they were designed to verify.
2022-06-17 10:29:52 +02:00
Frank Yung-Fong Tang 13c1b3b546 Fix expectation
@romulocintra @sffc
2022-06-17 10:23:20 +02:00
Ross Kirsling a3f09ea074 Temporal: Add missing feature flag for prototype.constructor tests. 2022-06-17 09:15:47 +02:00
Dmitriy Kubyshkin ba5529d926
Fix wrong error for a lexical redeclaration test (#3575)
The test as originally specified fails in all compatible parsers, but for the wrong reason. Below is an excerpt from V8, but all parser I tested behave the same:

```js
for (const x; false; ) {
           ^
SyntaxError: Missing initializer in const declaration
```

After the change the error is the assumed:

```js
  var x;
      ^
SyntaxError: Identifier 'x' has already been declared
```
2022-06-16 22:24:51 -04:00
André Bargull f169ba6ec7 Add tests for TemporalInstantString with bracketed time zone annotation 2022-06-16 15:03:30 +02:00
Ms2ger b1f49b5c46 Update test/built-ins/Temporal/PlainDate/compare/argument-zoneddatetime.js
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2022-06-14 16:45:56 +02:00
Ms2ger 820461ef4b Temporal: Extend tests for PlainDate.compare. 2022-06-14 16:45:56 +02:00
Philip Chimento ee7055121d Temporal: Add tests for invalid Temporal.Instant strings
This adds tests to all entry points where an ISO string is converted to a
Temporal.Instant. The tests exercise various invalid ISO strings to make
sure that they throw a RangeError.
2022-06-14 15:56:06 +02:00
Philip Chimento 0e86baf6f3
Temporal: Add tests for order of observable operations in *FromFields methods (#3568)
This adds tests for https://github.com/tc39/proposal-temporal/pull/2203
which was a normative change that reached consensus in the June 2022 TC39
plenary meeting.

Co-authored-by: Ms2ger <Ms2ger@gmail.com>
2022-06-14 15:46:16 +02:00
Ms2ger 697784363f Temporal: Add toZonedDateTime tests. 2022-06-13 17:57:54 +02:00
Ms2ger 6f2e6872fb
Temporal: Extend tests for getISOFields. (#3560) 2022-06-13 08:55:55 -07:00
Ms2ger 98b76ef533 Temporal: Extend tests for PlainDate#toPlainMonthDay. 2022-06-13 17:52:34 +02:00
Ms2ger e6b7323614 Temporal: Extend tests for PlainDate#toPlainYearMonth. 2022-06-13 17:51:29 +02:00
Ms2ger 3812a1fe92 Temporal: Extend tests for PlainDate#toString. 2022-06-13 16:47:22 +02:00
Ms2ger 194f7426f9 Temporal: Add basic test for PlainDate#toJSON. 2022-06-13 16:45:42 +02:00
Ms2ger f9a5a8b29c Temporal: Extend test for withCalendar. 2022-06-13 16:38:07 +02:00
Ms2ger 56ed1a0f82 Temporal: Test custom calendar operations. 2022-06-13 16:37:06 +02:00
Ms2ger da19e0a50c Temporal: Add some Instant string tests. 2022-06-13 16:29:52 +02:00
Ms2ger 267aab37c2 Temporal: Add missing valueOf tests. 2022-06-13 16:27:28 +02:00