Ujjwal Sharma
f6034ebe9f
Add DateTimeFormat tests for OrdinaryHasInstance
...
Add tests to make sure DateTimeFormat does not call the instanceof
operator and calls OrdinaryHasInstance instead.
Refs: https://github.com/tc39/ecma402/pull/500
2021-02-16 12:20:50 -05:00
Ujjwal Sharma
76ab0187c0
Add NumberFormat tests for OrdinaryHasInstance
...
Add tests to make sure NumberFormat does not call the instanceof
operator and calls OrdinaryHasInstance instead.
Refs: https://github.com/tc39/ecma402/pull/500
2021-02-16 12:20:50 -05:00
ExE Boss
8f904d8cc8
Set function `length` and `name` in `CreateBuiltinFunction`
2021-01-29 09:45:20 -05:00
Yusuke Suzuki
df1961f16a
Fix formatRangeToParts/date-same-returns-single-date.js and add tests using practically-equal two dates
...
intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js is using `formatRange` and `format`.
Fix this test to use `formatRangeToParts` and `formatToParts` since it is the intention of this test.
This patch adds additional tests to intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js and
intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js. The new test uses two dates that are practially-equal,
and ensures the implementation uses `format` or `formatToParts` by detecting they are practically-equal.
2021-01-10 20:55:08 -05:00
Felipe Balbontín
6cf3433cf8
Update copyright in formatRange/date-same-returns-single-date.js and formatRangeToParts/date-same-returns-single-date.js
2021-01-03 19:52:18 -05:00
Felipe Balbontín
22cdb74659
Add tests for Intl.DateTimeFormat formatRange(ToParts) to check the behavior when startDate is the same as endDate ( tc39/proposal-intl-DateTimeFormat-formatRange#19 ).
2021-01-03 19:52:18 -05:00
Frank Yung-Fong Tang
b2e9dff281
change cel-gaulish map to xtg
2020-12-21 10:15:14 -05:00
Frank Yung-Fong Tang
7c9480476e
Update the test based on v35 of UTS35
...
see http://unicode.org/reports/tr35/#LocaleId_Canonicalization
@anba
2020-12-21 10:15:14 -05:00
Frank Yung-Fong Tang
483219a596
fix mapping for cel-gaulish
2020-12-16 11:59:06 -05:00
Frank Yung-Fong Tang
0b752efc09
Map "cel-gaulish" to "xtg"
2020-12-16 11:59:06 -05:00
Frank Yung-Fong Tang
4ff1828c5e
Update to CLDR 38
...
see
https://github.com/unicode-org/cldr/blame/master/common/supplemental/supplementalMetadata.xml#L531
and
http://unicode.org/reports/tr35/#LocaleId_Canonicalization
2020-12-16 11:59:06 -05:00
Frank Yung-Fong Tang
10bbf0030a
Change sgn-GR: sgn-GR to sgn-GR: gss per CLDR38
...
see c640c7b9ac/common/supplemental/supplementalMetadata.xml (L149)
2020-12-16 11:59:06 -05:00
Felipe Balbontín
c898b68ef6
Update the description of some Intl.DateTimeFormat formatRange(ToParts) tests based on changes introduced in tc39/proposal-intl-DateTimeFormat-formatRange#23
2020-12-10 09:17:00 -05:00
Rick Waldron
82f38efbab
Features: add "intl-normative-optional"
2020-11-03 14:28:17 -05:00
Yusuke Suzuki
20b11bee0f
Add tests for [[Description]] of Intl [[FallbackSymbol]]
...
If normative optional is implemented and [[FallbackSymbol]] is used, its description should be "IntlLegacyConstructedSymbol"
2020-11-02 12:34:09 -05:00
Jeff Walden
2cfccb765a
Add tests verifying that duplicate variants, in a tag or in the tlang component of a tag, make it structurally invalid.
2020-10-09 16:34:33 -04:00
Frank Yung-Fong Tang
42bf3a9f7a
Add the check of collation
2020-10-06 11:05:17 -04:00
Yusuke Suzuki
3c789640ec
dft-currency-mnfd-range-check-mxfd.js should check maximumFractionDigits, not maximumSignificantDigits
...
This test is checking maximumSignificantDigits, but this is wrong. We should check maximumFractionDigits.
2020-09-28 09:09:09 -04:00
Yusuke Suzuki
3fe45c44c6
Revert "Intl.NumberFormat + currency will throw an error if maximumFractionDigits is less than currencyDigits"
...
This reverts commit a7b9067fe1
.
I fixed the test with a7b9067fe1
based on the current spec, but this test was based on WIP spec change.
2020-09-24 14:55:28 -04:00
Yusuke Suzuki
e75ed15b91
Perl YAML parser cannot parse documents in options-granularity-abrupt-throws.js and options-granularity-toString-abrupt-throws.js
...
Remove line terminator.
2020-09-21 16:04:44 -04:00
Yusuke Suzuki
333da4198a
Connector of date and time style can be " at " or ", "
...
macOS system ICU is shipping new CLDR, but it has many overrides on the top of it to make the formatted output suitable for the system.
And in timedatestyle-en.js tests, we intentionally override the CLDR data with the different format.
This change modifies the test to accept that alternative output.
2020-09-19 15:35:45 -04:00
Yusuke Suzuki
a7b9067fe1
Intl.NumberFormat + currency will throw an error if maximumFractionDigits is less than currencyDigits
...
In 12.1.1 SetNumberFormatDigitOptions step 12.d[1], mnfd (minimum fraction digits) becomes the same to currencyDigits (mxfdDefault in this case).
It is 2 for USD, 4 for CLF. So, if maximumFractionDigits is less than that, we should throw RangeError.
[1]: https://tc39.es/ecma402/#sec-setnfdigitoptions
2020-09-15 10:33:23 -04:00
Rick Waldron
873a7241c3
Fixup Intl.* this-value tests (delete dups, add proper esid)
2020-09-14 13:35:13 -04:00
Frank Tang
ab3a86d9b3
Move tests from
...
https://source.chromium.org/chromium/chromium/src/+/master:v8/test/test262/local-tests/
2020-09-14 13:35:13 -04:00
Rick Waldron
6397602037
Update test/intl402/Segmenter/ctor-custom-get-prototype-poison-throws.js
...
Co-authored-by: Ujjwal Sharma <ryzokuken@disroot.org>
2020-09-10 16:08:39 -04:00
Rick Waldron
cce13c4c24
Update test/intl402/Segmenter/constructor/constructor/options-localeMatcher-toString-abrupt-throws.js
...
Co-authored-by: Ujjwal Sharma <ryzokuken@disroot.org>
2020-09-10 16:08:39 -04:00
Rick Waldron
74bed11865
Update test/intl402/Segmenter/constructor/constructor/options-granularity-toString-abrupt-throws.js
...
Co-authored-by: Ujjwal Sharma <ryzokuken@disroot.org>
2020-09-10 16:08:39 -04:00
Frank Tang
7a4a637574
Address review comments
2020-09-10 16:08:39 -04:00
Frank Tang
4f8ee98d26
Remove Unused include: "propertyHelper.js"
2020-09-10 16:08:39 -04:00
Frank Tang
2886465593
Add true for the test case
2020-09-10 16:08:39 -04:00
Frank Tang
6d97fa208a
Fix errors
2020-09-10 16:08:39 -04:00
Frank Tang
085cb50b25
Add more tests for Intl.Segmenter
2020-09-10 16:08:39 -04:00
Yusuke Suzuki
8060bba447
Accessing order of fractionalSecondDigits should be earlier than timeZoneName
...
In this PR[1], fractionalSecondDigits is listed earlier than timeZoneName in table 6[2].
So, accessing order of fractionalSecondDigits in [3]'s step-29 should be earlier than timeZoneName.
[1]: https://github.com/tc39/ecma402/pull/347
[2]: https://tc39.es/ecma402/#sec-datetimeformat-abstracts
[3]: https://tc39.es/ecma402/#sec-initializedatetimeformat
2020-09-02 15:30:46 -04:00
Ujjwal Sharma
6c3f8cdc75
Update tests for tc39/ecma402#471 ( #2707 )
2020-08-13 10:31:24 -07:00
Leo Balter
e0ef80b967
Merge pull request #2712 from shvaikalesh/intl402-intl-object-tostringtag
...
Add Intl[@@toStringTag] coverage
2020-07-30 15:19:38 -07:00
Yusuke Suzuki
f6a9847c73
related-year-zh.js may not contain years ( #2718 )
...
macOS system ICU is shipping new CLDR, but it has many overrides on the top of it to make the formatted output suitable for the system.
And in related-year-zh.js tests, we intentionally override the CLDR data with the different format.
This change modifies the test to accept that alternative output.
2020-07-29 14:58:32 -07:00
Frank Yung-Fong Tang
0f5a274aad
Fix Segmenter tests: Check "input" in segment-*-iterable.js ( #2714 )
...
* Check "input" in segment-*-iterable.js
Remove dup test in segment-*.js
* Fix segment-tostring.js
2020-07-29 12:00:35 -07:00
Yusuke Suzuki
80b54781b0
Intl.Segmenter iterator result should have isWordLike only if type is "word" ( #2717 )
...
Update according to https://github.com/tc39/proposal-intl-segmenter/pull/128 .
2020-07-28 10:53:16 -07:00
Alexey Shvayka
c46be192bb
Remove duplicated Intl.toString() test
2020-07-23 10:13:18 +03:00
Alexey Shvayka
f9622ce80b
Remove duplicated Intl.[[Prototype]] test
2020-07-23 10:13:13 +03:00
Alexey Shvayka
aa4fd3fffa
Add Intl[@@toStringTag] coverage
2020-07-23 10:13:12 +03:00
Yusuke Suzuki
538fcd88d8
Intl.DisplayNames.length should be 2 ( #2711 )
...
`locales` and `options` are not optional parameters. So the length should be 2.
2020-07-20 16:29:05 -07:00
Frank Tang
5010996d5d
Test invalid type
2020-07-13 15:50:07 -07:00
Frank Tang
3c89cde3e0
Intl.DisplayNames make type required
...
Update the tests to the latest version after we make
the type option now required
Spec:
https://tc39.es/proposal-intl-displaynames/
Changes of spec:
https://github.com/tc39/proposal-intl-displaynames/pull/76
https://github.com/tc39/proposal-intl-displaynames/pull/83
2020-07-10 19:19:34 -07:00
Frank Yung-Fong Tang
59f5b49359
remove 0 from the range and use undefined
2020-07-09 21:52:54 -04:00
Frank Yung-Fong Tang
1161eee3e4
use undefined instead of 0
2020-07-09 21:52:54 -04:00
Frank Yung-Fong Tang
36e4278f20
use undefined instead of 0 so range is only 1-3
2020-07-09 21:52:54 -04:00
Frank Yung-Fong Tang
21824359d0
restrict the range from 1 to 3
2020-07-09 21:52:54 -04:00
Frank Yung-Fong Tang
e620226cd7
limit the range to 1 to 3 only
2020-07-09 21:52:54 -04:00
Yusuke Suzuki
281eb10b28
Intl.DateTimeFormat.{formatRange,formatRangeToParts} should throw TypeError instead of RangeError if either of parameter is undefined ( #2685 )
...
http://tc39.es/proposal-intl-DateTimeFormat-formatRange/
The spec draft throws TypeError instead of RangeError.
1.4.5 Intl.DateTimeFormat.prototype.formatRange ( startDate , endDate )
...
4. If startDate is undefined or endDate is undefined, throw a TypeError exception.
1.4.6 Intl.DateTimeFormat.prototype.formatRangeToParts ( startDate , endDate )
...
4. If startDate is undefined or endDate is undefined, throw a TypeError exception.
2020-07-01 14:45:43 -07:00