Commit Graph

5792 Commits

Author SHA1 Message Date
Sarah GHP a5fd6d21a6 Add draft for community responsibilities 2022-06-02 19:19:24 +02:00
Ms2ger 53d6cd6d46 Temporal: Add tests for converting a ZonedDateTime to a PlainDate. 2022-06-02 08:50:05 +02:00
Marko Lahma 715c3ceb16 Add test262-harness-dotnet to README
I've developed a library for running and generating (currently) NUnit based test suites for test262. This is already being successfully used in two .NET projects, Jint (JS interpreter) and esprima-dotnet (JS parsing library).
2022-06-01 14:34:32 -07:00
Sarah Groff Hennigh-Palermo 520c418499
Merge pull request #3547 from Razican/fix_flags
Fixed #3545
2022-06-01 13:29:06 +02:00
Iban Eguia Moraza 53df4bc69a
Fixed #3545 2022-05-31 16:28:31 +02:00
Ms2ger f7b626133d Temporal: Add tests for prototype.constructor. 2022-05-26 10:34:10 +02:00
Ms2ger ed5ada3e13 Temporal: Improve coverage for PlainDate constructor and from(). 2022-05-25 11:39:05 -07:00
Ms2ger 1aeed72ab5 Temporal: Add arguments to constructor tests. 2022-05-25 11:35:10 -07:00
Ms2ger 6573cf954b Temporal: Add tests that subclass constructors work. 2022-05-25 11:23:22 -07:00
Ms2ger 2c8e4c061b Temporal: Cleanup some tests.
The options-invalid.js tests were also covered by options-wrong-type.js.

The tests for add/subtract without an options argument were also covered by options-undefined.js.
2022-05-25 11:10:04 -07:00
Romulo Cintra 406ec000f2
Tests combinations max-min fractionDigits and Significant digits (#3515)
NumberFormat v3
2022-05-25 10:50:46 -07:00
Ms2ger 63cf9ba7b5 Temporal: Extend tests for daysInYear and inLeapYear. 2022-05-24 10:56:45 -07:00
Philip Chimento 579268ab79 Temporal: Add tests for variant time separators
ISO strings may separate the time from the date with a case-insensitive T,
or a space. This adds tests to all entry points that take ISO strings, to
ensure that they accept an uppercase T, lowercase T, or space as the time
separator.

These tests are based on the one test for Temporal.PlainDateTime.from that
was already present.
2022-05-23 11:47:56 +02:00
Ms2ger 7fca6637e9 Temporal: Extend toJSON/toString tests. 2022-05-20 09:32:52 -07:00
Ms2ger 2de2fe3084 Temporal: Ensure PlainTime branding tests fail if needed. 2022-05-20 14:20:43 +02:00
Ms2ger 7960d616cf Temporal: Add a test for PlainTime#toZonedDateTime. 2022-05-19 12:55:27 -07:00
Ms2ger a1a5c91543 Temporal: Add a test for PlainTime#calendar. 2022-05-19 12:54:14 -07:00
Ms2ger b8ab7063b0 Temporal: Add tests for PlainTime#{toJSON/toString}. 2022-05-19 12:23:43 -07:00
Ms2ger 912559f683 Temporal: Test @@toStringTag properties. 2022-05-19 12:20:15 -07:00
Ms2ger 494b678cc5 Temporal: Add tests for ZonedDateTime to PlainDate conversion.
Also rename leap second tests for consistency.
2022-05-18 12:35:07 -07:00
legendecas 6f8e0f67ca Decorators: add initial tests on class 2022-05-18 09:49:49 -04:00
Chengzhong Wu 509363bcfd
Add test on handling broken promises in AsyncGenerator.prototype.return (#3472)
* Add test on handling broken promises in AsyncGenerator.prototype.return

* fixup!

* fixup!
2022-05-12 14:28:33 -04:00
legendecas 2e7cdfbe18 Fix generator clean fail on .DS_Store 2022-05-05 17:03:58 -04:00
legendecas d6b5b1358c ShadowRealm: exportName is no longer be coerced to a string 2022-05-05 17:03:33 -04:00
Keith Miller b409843612 Update S12.6.4_A7_T2.js
This test currently has some tabs. Clean this up and make them spaces instead.
2022-05-05 10:19:37 -07:00
Jordan Harband 00263bf90f add missing Reflect.construct feature 2022-05-05 17:13:25 +02:00
Philip Chimento 2a03068b84 Fix Temporal.PlainDateTime.withPlainDate tests
I suggested in #3517 that these lines should be removed but didn't realize
they must be present because TemporalHelpers.assertPlainDateTime is going
to check the 'era' and 'eraYear' properties.
2022-05-05 09:51:01 +02:00
Shane F. Carr 0a48029333
Fix Intl.NumberFormat roundingPriority test to reflect default values for min/max digits (#3506) 2022-05-04 11:31:56 -07:00
Mathias Bynens 997888324e Add missing binding 2022-05-04 07:57:38 -07:00
Philip Chimento a44a97a09a Add reference ISO days to PlainYearMonth assertions
I missed adding these in 27f0104bc6
2022-05-04 10:15:19 +02:00
Frank Yung-Fong Tang 06fafd794b
Move testing of era/eraYear under intl402 (#3517)
* Move testing of era/eraYear under intl402

* remove era/eraYear from built-in tests.
2022-05-03 11:11:20 -07:00
Romulo Cintra 28455b13f5
Intl.DurationFormat update coverage (#3501)
* constructor tests coverage
* add localeMatcher tests
* add styles and numbering system tests
* re-organize folder and files structure
2022-05-03 08:19:32 -07:00
Ms2ger 7099acc882 Temporal: Add some tests for Duration#round.
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2022-05-03 08:15:56 -07:00
Ms2ger 69fd39b463 Temporal: Add some Duration#{add,subtract} tests. 2022-05-03 08:15:56 -07:00
Philip Chimento 8e0e2592d3 Expand Duration.compare test
This adds coverage for the situation where we get a different answer from
Temporal.Duration.compare depending on whether relativeTo resolves to a
PlainDate or ZonedDateTime.

See discussion in
https://github.com/tc39/test262/pull/3505#discussion_r859994610
2022-05-03 08:18:02 +02:00
Philip Chimento 65a7ace1cb Regularize year zero tests
Some of these strings wouldn't have been valid even with a valid year in
them (e.g. strings ending in +01:00[UTC]) so fix up the strings that we
test. While touching these tests, I took the opportunity to regularize
them, and add some missing ones for ISO strings that convert to Calendar
and TimeZone.
2022-05-03 08:18:02 +02:00
Philip Chimento 020faf5c7a Temporal: fix property bag order
No big deal, this was just bothering me that I wrote timeZone before
calendar in most of the tests, and vice versa in only a few.
2022-05-03 08:18:02 +02:00
Philip Chimento 88a4cf4af7 Temporal: Use some constructors directly
Be consistent about creating Temporal objects for use in tests with direct
constructor calls, instead of relying on string coercions. This reduces
coupling in the tests.
2022-05-03 08:18:02 +02:00
Philip Chimento 078f3e22a4 Regularize leap second tests
Everywhere an ISO string is accepted in Temporal, a seconds value of :60
should always be coerced to :59, because of how leap seconds are handled
in ISO strings.

In property bags, a 'seconds: 60' property is not subject to that rule: it
should be handled according to the overflow option if there is one.

These tests existed already for some types; regularize them and add the
ones that didn't exist yet.
2022-05-03 08:18:02 +02:00
Philip Chimento 27f0104bc6 Regularize Temporal.*.from() object cloning tests
Each from() method except Calendar and TimeZone should test that when you
pass an instance of that type, the return value is a clone of that
instance, and a distinct object.

These tests existed already for some types; regularize them and add the
ones that didn't exist yet.

In order to test the referenceISODay of a PlainYearMonth we add an
argument to TemporalHelpers.assertPlainYearMonth.
2022-05-03 08:18:02 +02:00
Ms2ger b649e6b22a Temporal: Port some Duration.compare tests. 2022-04-29 10:58:05 -07:00
Jesse Alama dcd25e616d Temporal: Port Demitasse tests for `PlainDateTime`'s `toString` 2022-04-28 12:20:22 +02:00
Jordan Harband 28b31c0bf1 use `isConstructor` assertion in "non-constructor" tests 2022-04-27 12:23:50 -04:00
Ms2ger 7f2668f807 Temporal: Port a few tests for Duration#{add,subtract}. 2022-04-27 09:31:33 +02:00
Jesse Alama d156a5a63f Temporal: Port `PlainDateTime`'s Demitasse `withCalendar` tests
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2022-04-26 10:11:11 +02:00
Ms2ger 8f5c7aed09 Temporal: Fix bug in PlainDateTime/prototype/toZonedDateTime/basic.js. 2022-04-25 11:36:56 -04:00
Frank Tang 576c0c0c7f Make minimumFractionDigits = maximumFractionDigits
Make minimumFractionDigits equal to maximumFractionDigits while
roundingIncrement != 1 to sync with latest spec change in
https://github.com/tc39/proposal-intl-numberformat-v3/pull/85
which landed to spec text in Feb 22, 2022
2022-04-25 11:35:24 -04:00
Philip Chimento 8a1ec2f20b Test ISO strings with extended year -000000
In Date.parse() and new Date(), representations of the year 0 as -000000
must not be accepted. In the case of Date.parse(), they should yield NaN,
and in the case of new Date(), they should yield an invalid Date object,
whose valueOf() is NaN.
2022-04-25 11:34:52 -04:00
Jesse Alama 1b71018adb Temporal: `PlainDateTime`: Port Demitasse tests for bounds 2022-04-25 12:22:49 +02:00
Jesse Alama cba02351f8 Temporal: Port Demitasse tests for PlainDateTime toZonedDateTime 2022-04-25 12:16:46 +02:00