Commit Graph

46 Commits

Author SHA1 Message Date
Philip Chimento ae53326189 Test TypeError is thrown when getOffsetNanosecondsFor is not callable
Tests for the normative changes made to Temporal in
https://github.com/tc39/proposal-temporal/pull/1829
In a previous version of the specification, there was a fallback to the
intrinsic getOffsetNanosecondsFor when it was undefined.
2021-11-16 17:06:06 -05:00
Frank Yung-Fong Tang 61339fd294
Sync test of Temporal.Calendar.p*.fields to 1750 (#3188)
* Sync test  of Temporal.Calendar.p*.fields to 1750

https://github.com/tc39/proposal-temporal/pull

* add more test

* add more tests for T*.Calendar.p*.fields

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/repeated-throw.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/reverse.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/reverse.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Remove loop

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update long-input.js

* Update repeated-throw.js

* Update reverse.js

* ensure the implementation check the content

make sure the validation does not happen after the looping the generator

* add test to check all valid field value

Co-authored-by: Ms2ger <Ms2ger@gmail.com>
2021-10-05 23:03:07 -04:00
Philip Chimento 56e537b916 Consolidate duplicate tests
There were a few tests already in the tree that overlapped ones that I
added in the previous commit. I've consolidated these and taken
information from the deleted ones where applicable, and improved on the
autogenerated assertion messages.
2021-10-01 14:30:12 -04:00
Philip Chimento 77a34cf93f Add Temporal tests
This copies over the tests that previously existed in the
tc39/proposal-temporal repository.

For context, see thread starting at:
https://github.com/tc39/test262/issues/3002#issuecomment-926234480

In service of https://github.com/tc39/test262/issues/3002
2021-10-01 14:30:12 -04:00
Mike Pennisi d9ddf80479 Revert "Merge pull request #3219 from tc39/rwaldron/migrate-comparearray"
This reverts commit b690cb67be, reversing
changes made to 50dd431dff. This is
necessary because the reverted changeset reduced coverage by an unknown
extent.
2021-10-01 10:18:47 -04:00
Philip Chimento c7ca06acb2
Remove duplicate tests (#3222)
While working on adding the Temporal tests from tc39/proposal-temporal I
noticed that these tests tested the same thing as each of the branding.js
tests in the same directory. This removes the duplicate tests.
2021-09-30 20:17:12 -04:00
rwaldron 4847d9db5a chore: update test/**/*.js to use assert.compareArray wherever applicable 2021-09-24 12:58:15 -04:00
André Bargull 0181293d38 "era" and "eraYear" are ECMA-402 only properties.
Both properties are only present when ECMA-402 is supported.
2021-09-02 11:23:23 -07:00
Michael Dyck 9cb0746f52 Normalize some YAML
In some recently added tests, the `description` is a multi-line scalar
in flow notation. Change it to block notation.
2021-09-02 10:00:32 -04:00
Philip Chimento 45a913c057
Add branding tests from Temporal (#3138)
Closes: #3137

Co-authored-by: Ms2ger <Ms2ger@igalia.com>
2021-08-11 12:31:23 -07:00
Rick Waldron bb93efdb6b
Automated assertion message update (#3136)
This also required manually fixing the "actual" and "expected" order of many assert.sameValue(...) calls.
2021-08-10 10:40:04 -07:00
Frank Tang 86e23998e3 Add more tests 2021-08-06 18:31:47 -04:00
Frank Tang 88d1ede7d6 Split the test and add more tests 2021-08-06 18:31:47 -04:00
Frank Tang bb4729126c Remove incorrect lines 2021-08-06 18:31:47 -04:00
Frank Tang ee94a2ce7f fix directory name 2021-08-06 18:31:47 -04:00
Frank Tang 35850e5782 Add Temporal.Calendar.prototype.daysIn* tests. 2021-08-06 18:31:47 -04:00
Rick Waldron e6c21464f5 Automated feature flag update 2021-08-05 18:44:17 -04:00
Frank Tang 1c722a8158 fix comments 2021-08-05 18:31:44 -04:00
Frank Tang a87f987e7f add more tests 2021-08-05 18:31:44 -04:00
Frank Tang d554db9438 Fix YAML indent issue 2021-08-05 18:31:44 -04:00
Frank Tang 2d480d4c76 Fix directory name 2021-08-05 18:31:44 -04:00
Frank Tang 52bb16f9a5 Add tests for Temporal.Calendar.prototype.dayOf* 2021-08-05 18:31:44 -04:00
Frank Tang 97967a37b3 fix id 2021-08-05 18:31:06 -04:00
Frank Tang 6cc2d81dab Split to different files and test throwing Error 2021-08-05 18:31:06 -04:00
Frank Tang b5a4033fcc Fix directory name 2021-08-05 18:31:06 -04:00
Frank Tang 932c931a70 Add tests for Temporal.Calendar.prototype.(year|month*|day) 2021-08-05 18:31:06 -04:00
Frank Tang 750ec2b581 Fix YAML 2021-08-05 18:30:13 -04:00
Frank Tang 8ebded4cfa use harness and add more tests 2021-08-05 18:30:13 -04:00
Frank Tang 7418ba62b1 rm throws-range-error.js 2021-08-05 18:30:13 -04:00
Frank Tang b58e01afca Fix YAML 2021-08-05 18:30:13 -04:00
Frank Tang 721245be53 Fix directory name 2021-08-05 18:30:13 -04:00
Frank Tang e17cc7b4bf Add test for Temporal.Calendar.prototype.dateUntil 2021-08-05 18:30:13 -04:00
Frank Tang 1a36125f25 Remove simple.js 2021-08-05 18:27:03 -04:00
Frank Tang 8f2434ba4d Fix directory name 2021-08-05 18:27:03 -04:00
Frank Tang 6ab8e86471 Add test for Temporal.Calendar.p.date(Add|FromFields) 2021-08-05 18:27:03 -04:00
Frank Tang a585faf566 split simple into different files 2021-08-05 18:27:03 -04:00
Frank Tang 173684422c Added back fiels incorrectly removed 2021-08-05 18:27:03 -04:00
Frank Tang df42e9a19b split into different add files 2021-08-05 18:27:03 -04:00
Frank Tang f772019855 Fix directory name 2021-08-05 18:27:03 -04:00
Frank Tang 1195736914 Add test for Temporal.Calendar.p.date(Add|FromFields) 2021-08-05 18:27:03 -04:00
Frank Tang bf1b3f585f Add abstract operation test for dateFromFields 2021-08-05 18:27:03 -04:00
Frank Tang c0b3a5f074 Add test for abrupt completion for dateAdd 2021-08-05 18:27:03 -04:00
Frank Tang 6c077667fc Fix directory name 2021-08-05 18:27:03 -04:00
Frank Tang 4a34d84b20 Add test for Temporal.Calendar.p.date(Add|FromFields) 2021-08-05 18:27:03 -04:00
Michael Dyck 82e0487797 "Normalize" some YAML
In each case, it's the scalar value associated with the "description" key.
Normally in test262, this is written in either:
- block notation (indicated by '>' or '|'), or
- flow notation, single-line, on the same line as the key.

In the cases addressed by this PR, the value is instead written in:
- (1x) flow notation, *multi*-line, or
- (2x) flow notation, single-line, on the line *after* the key.

These are valid YAML, but they're styles that test262 doesn't otherwise use,
so could conceivably confuse people or harnesses.

This PR changes them to block notation.
2021-07-21 16:34:04 -04:00
Frank Yung-Fong Tang f1f3a2d542
Add test for 12.4.21 of Temporal (#3036)
* Add test for 12.4.21 of Temporal

12.4.21 Temporal.Calendar.prototype.fields ( fields )
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.fields

@sffc @Ms2ger @ryzokuken @ljharb

* move to the right file

* remove from wrong place
2021-07-13 19:39:07 -04:00