Commit Graph

6309 Commits

Author SHA1 Message Date
Shu-yu Guo 8468f3b810 Allow @tc39-staging to modify features.txt 2023-10-11 21:28:53 -07:00
André Bargull f0c16faee2 Fix symbol-tag-generators-builtin.js
Two issues:
1. There was a typo, the first `gen` should have been `genFn`.
2. And the last `toString` result should be `'[object Generator]'`,
   because `Object.getPrototypeOf(gen) == genFn.prototype`. And the
   `@@toStringTag` property of `genFn.prototype` is inherited from
   `Generator.prototype[@@toStringTag]`.

That also means the "iterator-helpers" flag isn't needed for this test.
2023-10-10 15:44:17 +02:00
Nicolò Ribaudo bf527dfa49 Move ES2023 features to "stable" list 2023-10-10 12:44:44 +02:00
Ms2ger 715dd1073b Only lint js and json files
CheckFileName is the only one that could arguably be valid for other files, but it doesn't seem worth the complexity to run it.
2023-10-06 13:45:37 +02:00
Jordan Harband e0436fc52d Object.prototype.toString: improve coverage 2023-10-05 12:15:27 -07:00
Jordan Harband 45d52b90ee Object.prototype.toString: split Symbol.toStringTag tests into separate files
See https://github.com/tc39/test262/pull/3855#issuecomment-1593543655
2023-10-05 12:15:27 -07:00
Daniel Minor 55e8cceb80 Revert "Revert "Fixup class names in class decorator private identifier tests.""
This reverts commit 31f703cbe69ec2e0fd4b94de2fdf505fb722b552.

The changes are needed to both the templates and the generated files.
2023-10-05 10:23:12 -07:00
Daniel Minor ca9fa92dc3 Fixup template files 2023-10-05 10:23:12 -07:00
Daniel Minor 3ef0777c04 Revert "Fixup class names in class decorator private identifier tests."
This changed the test files, not the templates used to generate the tests.
2023-10-05 10:23:12 -07:00
Daniel Minor 581de2d0f8 Fixup class names in class decorator private identifier tests.
For the statement level test, the inner class name is not initialized
at the time the decorators evaluate, resulting in a ReferenceError
that the declaration can not be accessed prior to initialization.

Similar, non-decorator code, like:
    class C {
        static dec() {}
        static {
            this.x = C.dec();
            class C {}
        }
    }
also results in a ReferenceError.

For the expression level test, the var C is undefined at the time the
decorators are evaluated, resulting in TypeError while trying to access
a member of undefined.

Similar, non-decorator code, like:
    var C = class {
        static f() {};
        static {
            this.x = C.f();
        }
    }
also results in a TypeError.
2023-10-05 10:23:12 -07:00
Philip Chimento dceb204259 Temporal: Tests for absolute value bug in duration rounding no-op conditions
Repeat all the existing tests for no-op duration rounding operations, but
with negative durations.
2023-10-04 15:35:39 -07:00
Philip Chimento c04b417f66 Temporal: Precalculate PlainDateTime from ZonedDateTime in more places 2023-10-04 15:35:39 -07:00
Philip Chimento 3a57a424e0 Temporal: Look up getOffsetNanosecondsFor only once when resolving ambiguous datetime 2023-10-04 15:35:39 -07:00
Philip Chimento 9b8d9cf66c Temporal: Fast-path dateUntil() when difference largest unit is days
This removes several loopholes where it was possible to return particular
values from user calls that would cause infinite loops, or calculate
zero-length days.
2023-10-04 15:35:39 -07:00
Philip Chimento 7a3944c0cc Temporal: Fast-path differences between identical objects 2023-10-04 15:35:39 -07:00
Philip Chimento 34ce4bd53a Temporal: Fast-path dateAdd() when adding only days 2023-10-04 15:35:39 -07:00
Philip Chimento da3dd8802f Temporal: Avoid calendar operations when adding days-only duration to PlainDate 2023-10-04 15:35:39 -07:00
Philip Chimento b5a5b283a3 Temporal: Fast-path AddDaysToZonedDateTime in AddZonedDateTime 2023-10-04 15:35:39 -07:00
Philip Chimento 8040379076 Temporal: Avoid calendar operations when adding days-only duration to ZDT
This allows removing several tests, as calendar.dateAdd() is no longer
called in several places, and it's no longer possible to create a
situation where BigInt arithmetic is observable in NanosecondsToDays.
2023-10-04 15:35:39 -07:00
Ben Allen d2a6e21ff9 added missing features: line to metadata for two tests 2023-10-04 15:06:25 -07:00
Ben Allen 47eb8dd685
Update to reflect normative change in formatting when Intl.DurationFormat's fractionalDigits option is undefined (#3890) 2023-10-03 13:32:13 +02:00
Ben Allen 5e6f25bb4f added clarifying comments on hourCycle-dateStyle.js 2023-10-02 14:39:52 -07:00
Ben Allen 5606c3012e corrected hourCycle-default.js to handle language tags with -u-hc-h24 extension 2023-10-02 14:39:52 -07:00
Ben Allen 800d136d96 updated hourCycle-default.js to reflect new behaviour of hourCycle, which now associates h12 with h23 rather than h24. see https://github.com/tc39/ecma402/pull/758. 2023-10-02 14:39:52 -07:00
Ben Allen 63456adb38 created type-language-invalid.js for DisplayNames.prototype.of()
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
2023-10-02 14:01:04 -07:00
André Bargull 9f5938bc15 Fix harness tests for verifyProperty 2023-10-02 11:27:59 +02:00
Alexey Shvayka be53234590
Test that `HasVarDeclaration` accounts for bindings created via `eval()` (#3914)
Co-authored-by: Alexey Shvayka <ashvayka@apple.com>
2023-09-28 18:16:33 +02:00
Frank Yung-Fong Tang 6789b50cce
Add test for ECMA402 PR 788 (#3917)
* Add test for ECMA402 PR 788

https://github.com/tc39/ecma402/pull/788

* Fix misunderstanding about "+00:00"

* Fix lint

* Swap actual, expected position

* Update test/intl402/DateTimeFormat/prototype/resolvedOptions/offset-timezone-change.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/prototype/resolvedOptions/offset-timezone-basic.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/prototype/formatToParts/offset-timezone-correct.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/constructor-invalid-offset-timezone.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/constructor-invalid-offset-timezone.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/prototype/resolvedOptions/offset-timezone-change.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/constructor-invalid-offset-timezone.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/prototype/format/offset-timezone-gmt-same.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/prototype/format/offset-timezone-gmt-same.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/DateTimeFormat/prototype/formatToParts/offset-timezone-correct.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

---------

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
2023-09-26 09:22:50 -07:00
Frank Yung-Fong Tang b5fd799fa0
Add Tests for ECMA402 PR811 (#3911)
* Add Tests for ECMA402 PR811

Add tests to check the order of option readings and output
keys in resolvedOptions of Intl.NumberFormat and PluralRules.

* Address reveiw feedback

Hard code the list of property to be inspect for GetOption
Use compareArray

* Update test/intl402/NumberFormat/constructor-option-read-order.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/NumberFormat/constructor-option-read-order.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/NumberFormat/prototype/resolvedOptions/return-keys-order-default.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/PluralRules/constructor-option-read-order.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Update test/intl402/PluralRules/constructor-option-read-order.js

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>

* Fix intl402/PluralRules/prototype/resolvedOptions/return-keys-order-default.js

To test all options

* Add more tests

---------

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
2023-09-26 08:58:27 -07:00
André Bargull 989377d62d Fix import assertions tests
- Correct file paths in "ensure-linking-error_FIXTURE.js"
- Remove no longer valid assertion in "import-assertion-empty.js".

See also #3919.
2023-09-25 08:33:51 -07:00
André Bargull 16fc2e5e18 Use correct variables in time zone case insensitive test
Also remove `US/Pacific-New` which has been removed from tz data since
release 2020b.
2023-09-22 09:02:08 -07:00
Shu-yu Guo dd30d83e9e Fix 'wrtiable' typos 2023-09-19 17:09:33 -07:00
Rezvan Mahdavi Hezaveh 79f087814f
Update two constructor tests of Array.fromAsync (#3926)
* Update two constructor tests of Array.fromAsync

* Remove extra comment

---------

Co-authored-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
2023-09-18 17:45:49 -07:00
Mathias Bynens 59bad89898
Add Unicode v15.1.0-sensitive `IdentifierPart` tests (#3833)
Ref. https://github.com/tc39/ecma262/issues/3073
2023-09-15 12:27:42 +02:00
Frank Yung-Fong Tang 3c9b3913b2
Add Collator test for ignorePunctuation (#3913)
Test the explicit setting of ignorePunctuation in the option bag
reflect to the value in resolvedOptions() under Thai and
other locales. (Thai is a special case)

Test the behavior of the compare sync with the value of
resolvedOptions().ignorePunctuation
2023-09-13 17:48:22 +02:00
André Bargull 1bd99bf069 Remove excess leading whitespace 2023-09-13 16:05:40 +02:00
André Bargull c140af3cb3 Update other test/language tests to use verifyProperty 2023-09-13 16:05:40 +02:00
André Bargull a7ee7473b7 Use verifyProperty in language/arguments-object tests 2023-09-13 16:05:40 +02:00
André Bargull f2275d23f4 Use verifyProperty in language/literals tests 2023-09-13 16:05:40 +02:00
André Bargull e6f1feb04d Use verifyProperty in language/global-code tests 2023-09-13 16:05:40 +02:00
André Bargull 8ff30c73ce Use verifyProperty in language/eval-code tests 2023-09-13 16:05:40 +02:00
André Bargull 08a7b9d4b6 Use verifyProperty in language/expressions tests 2023-09-13 16:05:40 +02:00
André Bargull ff81dccfc3 Use verifyProperty in language/statements tests 2023-09-13 16:05:40 +02:00
André Bargull 99096762ca Use verifyProperty in remaining test/intl402 tests 2023-09-13 16:05:40 +02:00
André Bargull f32dc36f3e Use verifyProperty in test/intl402/PluralRules tests 2023-09-13 16:05:40 +02:00
André Bargull ad3f1a6ade Use verifyProperty in test/intl402/NumberFormat tests 2023-09-13 16:05:40 +02:00
André Bargull fe2c17bf4b Use verifyProperty in test/intl402/DateTimeFormat tests 2023-09-13 16:05:40 +02:00
André Bargull 967b16500a Use verifyProperty in test/intl402/Collator tests 2023-09-13 16:05:40 +02:00
André Bargull 534decc36d Fix typos in calls to verifyProperty
And update verifyProperty to catch misspelled descriptor fields.
2023-09-13 16:05:40 +02:00
André Bargull b4f72feb52 Verify object value in addition to descriptor value in verifyProperty 2023-09-13 16:05:40 +02:00