Commit Graph

5950 Commits

Author SHA1 Message Date
Richard Gibson c58ac691eb Test that "infinity" is not recognized as numeric 2022-04-04 16:56:40 -04:00
Richard Gibson c572588ea9 Test that "INFINITY" is not recognized as numeric
Fixes #3442
2022-04-04 16:56:40 -04:00
Shu-yu Guo 51822ff2d8 Update Symbol.species tests for TypedArray constructor
This updates tests in line with
https://github.com/tc39/ecma262/pull/2719
2022-04-04 16:52:23 -04:00
Philip Chimento da507a703e Tests for Temporal formatting the year appropriately as 4 or 6 digits
https://github.com/tc39/proposal-temporal/pull/2090 is a normative change
that reached consensus at the March 2022 TC39 plenary meeting. This adds
tests that verify the change made to the formatting of years between 0 and
999 inclusive in all toString and toJSON methods of Temporal types that
can output an ISO year number in their return value.
2022-04-04 16:36:03 -04:00
Frank Tang cdcf2a3f09 Add tests for Temporal.Calendar.p*.inLeapYear
(Philip, March 2022: This was originally Frank's PR #3056. I did some
reformatting, removed duplicate tests, and combined with some existing
tests.)
2022-04-04 16:34:01 -04:00
Frank Tang 16aefcc6cf Add tests for Temporal.Calendar.p*.mergeFields
(Philip, March 2022: This was originally Frank's PR #3057. I did some
reformatting, removed duplicate tests, addressed the review comments that
I left the first time around, and added some cases that I felt were not
yet complete.)
2022-04-04 16:34:01 -04:00
Frank Tang 6bae30c1b2 Add tests for Temporal.Calendar.p*.monthDayFromFields
(Philip, March 2022: This was originally Frank's PR #3058. I did some
reformatting, removed duplicate tests, and combined with some existing
tests.)
2022-04-04 16:34:01 -04:00
Frank Tang c22b8ab9c4 Add tests for Temporal.Calendar.p*.monthsInYear
(Philip, March 2022: This was originally Frank's PR #3059. I did some
reformatting, removed duplicate tests, and combined with some existing
tests.)
2022-04-04 16:34:01 -04:00
Frank Tang b064eb64f3 Add tests for Temporal.Calendar.p*.weekOfYear
(Philip, March 2022: This was originally Frank's PR #3060. I did some
reformatting, removed a test that didn't exercise the whole feature, and
combined some duplicate tests with some existing tests.)
2022-04-04 16:34:01 -04:00
Philip Chimento ac19506a01 Add tests ensuring that observable calls are made with options === undefined
Where possible, observable calls originating from within Temporal, that
require an options argument, should pass `undefined` as that options
argument, rather than `{}` or `Object.create(null)`.

See tc39/proposal-temporal#1685.
2022-04-04 16:24:17 -04:00
Philip Chimento 16ad841e7e Fix arithmetic in TemporalHelpers.oneShiftTimeZone
I made a mistake with one of the signs in one of the time zones that we
use for verifying DST handling. Luckily this didn't affect any previously
existing tests, but it affected some new tests that I'm going to add in
the next commit.

How do I know that _this_ arithmetic is correct? I feel reasonably
confident with the added test.
2022-04-04 16:24:17 -04:00
Mike Pennisi 276e79d62e Deprecate some property helpers
Document the preference for `verifyProperty` over the various other
property-related helper functions.
2022-04-04 11:28:37 -04:00
jugglinmike 5eb7dfbced
Remove configuration file for third-party tool (#3450)
The `.jshintrc` file configures the JavaScript "linting" tool named
JSHint. Test262 does not depend on that tool, making the file's purpose
and validity ambiguous and potentially distracting.
2022-04-04 11:27:22 -04:00
Romulo Cintra 926b0960d7
update nfv3 test for roundingIncrement (#3441) 2022-03-31 14:53:20 -07:00
Jesse Alama 4c7c24646a
Check a variety of offset Etc/GMT timezones (#3403)
Tests for normative change https://github.com/tc39/proposal-temporal/pull/2050
2022-03-30 08:33:52 -07:00
Jesse Alama fe40aea50c Emit fallback day 1 2022-03-29 16:58:36 -07:00
Jesse Alama 9aaa22cb06 Ensure fallback years values are present 2022-03-29 16:58:36 -07:00
Jesse Alama ee1f96235b Ensure reference data is emitted when calendarName = 'always'
References:

+ https://github.com/tc39/proposal-temporal/issues/1971
2022-03-29 16:58:36 -07:00
Jesse Alama 76b0bafba6 Update test/built-ins/Temporal/Duration/compare/twenty-five-hour-day.js
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2022-03-29 16:50:41 -07:00
Jesse Alama 2aa754b7cf Add test for DST balancing
References:

+ https://github.com/tc39/proposal-temporal/issues/1791

Thanks @ptomato for the suggestion to use
`springForwardFallBackTimeZone`.
2022-03-29 16:50:41 -07:00
Richard Gibson 3ab8adc237 Require String.prototype.localeCompare to check for canonical equivalence 2022-03-29 16:43:22 -04:00
Philip Chimento 3eea1a7959 Add tests for various invalid ISO strings for PlainDate
These tests check API entry points that convert strings to
Temporal.PlainDate, with a list of various strings that are all not valid
for that context according to ISO 8601.
2022-03-29 11:26:53 -04:00
Philip Chimento ad74a4ebba Rename some "argument-string" tests to be more specific
I'd like to add basic functionality tests for string arguments, and these
tests are testing something more specific: that a Get of the "overflow"
property on the passed-in options object is observable. Rename
accordingly.
2022-03-29 11:26:53 -04:00
Frank Tang 52af2b6763 Add tests for Temporal.Calendar.p*.yearMonthFromFields
(Philip, March 2022: This was originally Frank's PR #3061. I did some
reformatting, removed duplicate tests, and combined with some existing
tests.)
2022-03-29 11:23:43 -04:00
Frank Tang 0bad719e79 Add test for Temporal.Duration.p*.abs
(Philip, March 2022: This was originally Frank's PR #3062. I did some
reformatting and removed duplicate tests)
2022-03-29 11:23:43 -04:00
Frank Tang f23602f6ce Add test for Temporal.Duration.p*.negated
(Philip, March 2022: This was originally Frank's PR #3063. I did some
reformatting and removed duplicate tests)
2022-03-29 11:23:43 -04:00
Frank Tang b8af7ff369 Add test for Temporal.Duration.p*.toJSON
(Philip, March 2022: This was originally Frank's PR #3064. I did some
reformatting and removed duplicate tests)
2022-03-29 11:23:43 -04:00
Frank Tang 2c8b69f8d0 Add tests for Temporal.Duration.p*.with
(Philip, March 2022: This was originally Frank's PR #3065. I did some
reformatting, removed duplicate tests, and combined with some existing
tests.)
2022-03-29 11:23:43 -04:00
Iban Eguia Moraza f59bafaa20 Fixed YAML in some new test metadata 2022-03-28 12:49:32 -07:00
Jesse Alama 99b2a70789
Use ECMAScript version 11 (#3448)
We use BigInt syntax in a bunch of tests. This change
registers that fact with linters that use `.jshintrc`.
2022-03-25 20:13:17 -04:00
Ms2ger f964584508 Expand overflow-invalid-string.js tests. 2022-03-25 11:18:13 -07:00
Jesse Alama 7b78d4be74
Port some basic Temporal.PlainDateTime tests from Demitasse to test262 (#3430)
* Create a Temporal.PlainDateTime with all arguments supplied.

Migrates some tests that currently exist in the
proposal-temporal repo.

* Check all data in Temporal.PlainDateTimes, variously constructed

Enrich existing tests to check all basic data in the
instance of `Temporal.PlainDateTime`, not just a single
field.

These additional checks were motivated by the migration of
existing Demitasse tests in the proposal-temporal repo to
test262. The Demitasse tests check more than a single
field.
2022-03-21 12:16:18 -07:00
legendecas f71d5e29cb Add test for throwing WrappedFunctionCreate 2022-03-17 13:59:03 -04:00
Romulo Cintra 81895b1543 use all values max and min fraction and significant digits 2022-03-14 16:52:38 -07:00
Frank Tang 7d5b0ec6f4 Add test for Temporal.Instant.p*.add
This was originally Frank's PR #3075. I rebased it, added assertion
messages, did some reformatting, and combined with some existing tests.
2022-03-14 13:52:04 -04:00
Frank Tang 11c2559651 Add tests for Temporal.Instant.p*.subtract
(Philip, March 2022: I rebased Frank's original PR #3076, did some
reformatting, removed duplicate tests, and combined with some existing
tests.)
2022-03-14 13:52:04 -04:00
Philip Chimento 0bccacda69
Merge pull request #3429 from Igalia/roundingmode-invalid-string
Test more invalid values for roundingMode.
2022-03-11 16:01:53 -08:00
Ms2ger 104e5e8fab Test more invalid values for roundingMode. 2022-03-11 09:51:57 +01:00
Ms2ger 51ce1fa00f Expand some Duration#toString() tests. 2022-03-10 17:05:49 -05:00
Ms2ger c6c31c8dac Add and expand tests for Duration constructor / from(). 2022-03-10 17:05:49 -05:00
Ms2ger d45476b9fd Add a test for observable calls in Temporal.Duration constructor. 2022-03-10 17:05:49 -05:00
legendecas 50dc96e59e Split Array.prototype.Symbol.unscopables tests for features 2022-03-10 17:04:16 -05:00
legendecas d8fb00d741 Add missing feature flag array-grouping 2022-03-10 17:04:16 -05:00
Frank Yung-Fong Tang 5fb0f5b6d2 Remove SPACES before features 2022-03-09 15:24:33 -05:00
Frank Yung-Fong Tang bc4af482b0 Fix features by removing leading space 2022-03-09 15:24:33 -05:00
Philip Chimento f7fb969cc4 Add tests for T time designator prefix not allowing space
Here's a test I should have included in #3395. It's allowed to replace the
"T" in the middle of an ISO string with a space, but not when the "T" is a
time designator prefix. This assertion ensures that implementations make
this distinction correctly.
2022-02-28 14:41:18 -05:00
Jesse Alama 131c396b6a Remove number test (yields a different error, not an exception) 2022-02-28 14:37:03 -05:00
Jesse Alama 8ff1e510b9 Add a couple more types 2022-02-28 14:37:03 -05:00
Jesse Alama 9c6e3aff38 Move to more sensible location 2022-02-28 14:37:03 -05:00
Jesse Alama 10f9a69295 Move test to a more sensible location
Also, use a more sensible ID as well. Add another test (for
Date values).
2022-02-28 14:37:03 -05:00