Commit Graph

5599 Commits

Author SHA1 Message Date
Ms2ger d86b913c11 Test Temporal.Now. 2022-01-24 13:36:43 -05:00
Ms2ger 4eb14032ae Basic tests for PlainDate#{add,subtract}. 2022-01-24 13:35:39 -05:00
Ms2ger f768a24ab6 Test singular units in PlainDate#{add,subtract}. 2022-01-24 13:35:39 -05:00
Ms2ger 00b9691218 Test overflow 'constrain' in PlainDate#{add,subtract}. 2022-01-24 13:35:39 -05:00
Ms2ger a042241ed2 Test overflow 'reject' in PlainDate#{add,subtract}. 2022-01-24 13:35:39 -05:00
Ms2ger ef0b1507fc Test balancing in PlainDate#{add,subtract}. 2022-01-24 13:35:39 -05:00
Ms2ger 3fd429b231 Test PlainDate#{add,subtract}. 2022-01-24 13:35:39 -05:00
Ms2ger 3dfc587f36 Test PlainDate#{since,until}. 2022-01-24 13:35:39 -05:00
Ms2ger a46aecc12a Test PlainDate.from with more objects. 2022-01-24 13:35:39 -05:00
Ms2ger 6bf7d8207a Test functions as options in PlainDate.from. 2022-01-24 13:35:39 -05:00
Ms2ger b81ce78746 Test PlainDate.from with a number. 2022-01-24 13:35:39 -05:00
Ms2ger 4ec469c68c Test PlainDate.from with various strings. 2022-01-24 13:35:39 -05:00
Ms2ger 6f689c6c19 Rename PlainDate/from/argument-string.js. 2022-01-24 13:35:39 -05:00
Ms2ger 6ee33f1c86 Test PlainDate.from with trailing junk in string argument. 2022-01-24 13:35:39 -05:00
Romulo Cintra 66f4071495 update test 2022-01-24 13:28:44 -05:00
Romulo Cintra e687842030 update tests 2022-01-24 13:28:44 -05:00
Romulo Cintra 9f8ac1aace add instance checks 2022-01-24 13:28:44 -05:00
James Wright e87b0048c4 Include missing semicolons in Temporal tests. 2022-01-19 13:48:03 -05:00
Philip Chimento 631337b261 Remove duplication between built-ins/ and intl402/
There were two cases where tests in intl402/ had some duplication of tests
that are in built-ins/ as well. Remove this duplication, and restrict the
intl402/ tests to testing things that can't be tested on all hosts.
2022-01-19 13:47:43 -05:00
Philip Chimento a6faa8c000 Add tests using Intl time zones to intl402/
For cases in the previous commit that actually removed some functionality
from tests in built-ins/, add corresponding tests in intl402/ to preserve
test coverage of that functionality for hosts that do support Intl.
2022-01-19 13:47:43 -05:00
Philip Chimento 17b3c567ff Add more variations of ISO strings to "timezone-string-datetime" tests
Some of these tests have a larger variation of valid ISO strings that they
test, and others don't. Use the larger variation across all of these
files.
2022-01-19 13:47:43 -05:00
Philip Chimento ff62561247 Ensure tests in main suite do not use Intl time zones
This requires a few adjustments of time zone names and offsets in some
places. The only named time zone that is required to be supported by an
implementation not supporting ECMA-402 is "UTC".
2022-01-19 13:47:43 -05:00
Philip Chimento 6058710478 Improve various assertion messages 2022-01-19 13:47:43 -05:00
Philip Chimento dcf184a0ee Minor formatting fix 2022-01-19 13:47:43 -05:00
Yusuke Suzuki 1935e1b410 Fix Intl.NumberFormat useGrouping value tests
After Intl.NumberFormat v3, default useGrouping is "auto".
We also fix test/intl402/NumberFormat/test-option-useGrouping.js. After v3,
it accepts string and boolean.
2022-01-19 13:46:58 -05:00
Marko Lahma 91356f52f9 Add AggregateError as feature to seal-aggregateerror.js 2022-01-11 10:08:18 -05:00
Csaba Osztrogonác 00f682e746 tools: enforce restriction on YAML negative key
The phase field must precede the type field for negative tests
to have a consistent style and be able to parse easier.
Related to the goal of https://github.com/tc39/test262/issues/1997

Added this check to the linting script and updated tests accordingly.
2022-01-10 13:50:38 -05:00
Frank Yung-Fong Tang 9aedfd146d replace SPACE with NBSP
the " " before the currency symbol and between group are actually nbsp not SPACE.
2022-01-07 13:21:05 -05:00
Frank Yung-Fong Tang 16f3f494d3 fix test
1. "–" => " – "
2. Move the verifyProperty after assert.sameValue because it has side effect of removing that property while it is writable.
2022-01-07 13:20:17 -05:00
Frank Yung-Fong Tang b91167622b add includes: [propertyHelper.js] 2022-01-07 13:20:17 -05:00
Frank Yung-Fong Tang 0b8efb9c0d correct expectation 2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang a12f375a99 remove extra "Digits" 2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang fe9f29e4a8 Fix format-rounding-priority-less-precision.js
1. remove extra "Digits" in the spelling
2. fix the setting of minimumSignificantDigits is more precise since both will produce "1.00" w/o change
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang a665b5f3a2 fix case for roudingIncrement: 5000 2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang 4cc44841f6 fix test for roundingIncrement: 500 2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang 5ee4e0d609 change to minimumFractionDigits:1 2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang a8e89964b4 set minimumFractionDigits: 1 to testing of 250 2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang 2d52f74d97 set minimumFractionDigits: 1 2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang 4719c8c2dd adjuest setting for roundingIncrement: 25 2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang 9e50891a40 set minimumFractionDigits: 1 in format-rounding-increment-5
We need to set minimumFractionDigits: 1 for the case of {roundingIncrement: 5, maximumFractionDigits: 1} and also adjust the test expectation. 
Otherwise, inside testNumberFormat , it will call   getPatternParts to format 1.1 and -1.1 and cause pattern mismatch (because the result will be "1" instead of "1.1" in that configuration)

https://github.com/tc39/test262/blob/main/harness/testIntl.js#L2369
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang 63f2c5b10f Remove 1.1 case which should NOT throw RangeError
roundingIncrement: 1.1 will not throw RangeError because
1.  roundingIncrement is read by calling GetNumberOption 
2. GetNumberOption https://tc39.es/ecma402/#sec-getnumberoption will call DefaultNumberOption https://tc39.es/ecma402/#sec-defaultnumberoption and 
3. DefaultNumberOption will call floor() in step 3.
2022-01-07 13:18:18 -05:00
Frank Yung-Fong Tang 0fe508c5f0 change notation to "standard"
I do not believe this setup is correct if we use notation: "compact". 

in https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-setnfdigitoptions
notation is "compact"
mnsd is undefined
mxsd is undefined
mnfd is undefined
mxfd is undefined
hasSd is false
hasFd is false
needSd is false
needFd is false
so step 23 else block will be run
Set intlObj.[[RoundingType]] to morePrecision.
then in step 23 of https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-initializenumberformat
```
If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
```
2022-01-07 13:17:50 -05:00
Frank Yung-Fong Tang 9bfdf89edc Fix incorrect argument
2nd argument of TemporalHelpers.assertPlainDate is year, not Temporal.PlainDate object.
2022-01-07 13:14:27 -05:00
Csaba Osztrogonác bd1acb51a4 tools: enforce restriction on YAML includes key
Includes key should use flow notation to be able parsed easier
as suggested in https://github.com/tc39/test262/issues/1997

Added this check to the linting script and updated tests accordingly.
2022-01-05 17:27:58 -05:00
Mathias Bynens f864edbc1c Add identifier tests for private class fields specifically
@bathos discovered that multiple engines implement this incorrectly:
https://twitter.com/bhathos/status/1478370049303928832

With that in mind, it’s probably worth adding some test coverage.
Test generator patch: https://github.com/mathiasbynens/caniunicode/pull/6
2022-01-05 14:24:20 -05:00
Mike Pennisi 6c9b4de507 fixup! Add tests for "Intl NumberFormat v3" proposal 2022-01-04 09:35:13 -05:00
Mike Pennisi d071b37f09 Add tests for "Intl NumberFormat v3" proposal
This patch is intended to cover only one aspect of the proposal for
ECMA402: the "new rounding/precision options" feature.
2022-01-04 09:35:13 -05:00
Yusuke Suzuki 6804e59f9f Fix Intl.PluralRules.selectRange test
en-US's Intl.PluralRules.selectRange(102, 201) is "other", not "few".
2022-01-04 09:33:18 -05:00
Kevin Gibbons 56a4cab76c Add tests: order of coercion of arguments vs NaN check in Date methods 2022-01-04 09:32:53 -05:00
Mathias Bynens 489a9f8d52 Add tests for \p{…} with properties of strings
This functionality is part of the RegExp `v` flag proposal: https://github.com/tc39/proposal-regexp-set-notation
2022-01-04 09:31:37 -05:00