Commit Graph

6301 Commits

Author SHA1 Message Date
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
Frank Tang bba19d51ae Sync Intl Locale API tests w/ PR67
https://github.com/tc39/proposal-intl-locale-info/pull/67
2023-09-13 16:01:07 +02:00
Nicolò Ribaudo 1bb53aee3e
Update import attributes `assert` tests to current semantics (#3919)
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2023-09-13 11:35:06 +02:00
Philip Chimento e98bfb332e Temporal: Do away with CalculateOffsetShift in Duration.compare 2023-09-13 10:57:43 +02:00
Philip Chimento 5972c16b07 Temporal: Return early from Duration.compare if internal slots equal 2023-09-13 10:57:43 +02:00
Philip Chimento 80958c3267 Temporal: Avoid reconverting Zoned- to PlainDateTime in AddZonedDateTime 2023-09-13 10:57:43 +02:00
Philip Chimento a74fbada42 Temporal: Don't observably iterate array in built-in calendar's fields()
Note the monkeypatch of getPossibleInstantsFor in test/built-ins/Temporal/
TimeZone/prototype/getInstantFor/argument-builtin-calendar-no-array-
iteration.js.

Other than that, all the tests are basically identical.
2023-09-13 10:57:43 +02:00
Philip Chimento fdd44e2ea5 Temporal: Separate zoned and plain operations in RoundDuration
Adds new tests to order-of-operations.js in Duration.round and
Duration.total, to exercise the code path where previous to this normative
change, relativeTo would have been converted to PlainDate 3x and 2x,
respectively.
2023-09-13 10:57:43 +02:00
Philip Chimento 008b97932b Temporal: Don't convert relativeTo to PlainDate twice in Duration.compare 2023-09-13 10:57:43 +02:00