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
André Bargull
649d0d2c9a
Update list of non-algorithmic numbering systems
...
Per https://github.com/tc39/ecma402/pull/438
2020-06-24 12:11:36 -04:00
André Bargull
630f7dee66
Updated expected error in NumberFormat constructor per current spec
2020-06-24 12:11:36 -04:00
André Bargull
d42aaa4b15
Expect `undefined` when no fractional second digits are present
...
Change the expected value per the current PR.
2020-06-24 12:11:36 -04:00
Frank Tang
8d3dd2d1a0
Sync the test w/ changes in intl-datetime-style 43
...
See
https://github.com/tc39/proposal-intl-datetime-style/pull/43
2020-06-17 12:44:31 -04:00
Frank Tang
ae0de0b6bb
Remove redundant assert
2020-06-10 12:30:58 -04:00
Frank Tang
c6fd7eb602
Update Intl.Segmenter to latest spec
...
Remove methods removed in the latest reversion.
Still need to add tests for:
1.5.2.1 %SegmentsPrototype%.containing ( index )
1.6.2.1 %SegmentIteratorPrototype%.next ()
1.6.2.2 %SegmentIteratorPrototype% [ @@toStringTag ]
2020-06-10 12:30:58 -04:00
Alexey Shvayka
ef12a8b11c
Intl: Add coverage for meaningful @@toStringTag values ( #2634 )
...
* Add Intl.Collator tests
* Add Intl.DateTimeFormat tests
* Adjust Intl.NumberFormat tests
* Add Intl.PluralRules tests
* Remove now duplicated tests
* Add "toString-changed-tag.js" tests
2020-06-01 15:40:35 -07:00
Frank Yung-Fong Tang
850c65317f
Revert "Correct the expectation of zh-Hant"
...
This reverts commit e8dfe549a8
.
2020-04-29 17:22:28 -04:00
Frank Yung-Fong Tang
e8dfe549a8
Correct the expectation of zh-Hant
...
It is incorrect to expect the minimize result of "zh-Hant" to be "zh-TW". It should be "zh-Hant". Why?
first, what we have in input for zh-Hant
lang = zh
region = [none]
script = Hant
Now, look at the AddLikelySubtags algorithm in http://www.unicode.org/reports/tr35/#Likely_Subtags
2020-04-25 18:52:46 -04:00
Frank Yung-Fong Tang
c3e980addf
correct style-short.js
2020-04-25 18:48:40 -04:00
Frank Yung-Fong Tang
df861e4bbc
correct style-narrow.js
2020-04-25 18:48:40 -04:00
Frank Yung-Fong Tang
d6c1b361c8
style-long.js
2020-04-25 18:48:40 -04:00
Frank Yung-Fong Tang
17fe569a5e
correct style-short.js
2020-04-25 18:48:40 -04:00
Frank Yung-Fong Tang
81de828140
correct style-narrow.js
2020-04-25 18:48:40 -04:00
Frank Yung-Fong Tang
79c1818a68
Correct pl-pl*.js test for minimumGroupingDigits
...
pl has minimumGroupingDigits{"2"} in locale data according to CLDR
therefore there should be no \u00a0 between 1 and 000
Close https://github.com/tc39/test262/issues/2589
2020-04-25 18:48:40 -04:00
Frank Yung-Fong Tang
0942fe16ae
correct comments
2020-04-25 18:43:48 -04:00
Frank Yung-Fong Tang
9b54c22e10
correct comments
2020-04-25 18:43:48 -04:00
Frank Yung-Fong Tang
aabf688371
correct comment
2020-04-25 18:43:48 -04:00
Frank Yung-Fong Tang
e72a96572b
Change the compareArray to allow new property
...
Change the compareArray to code which allow new property but still assert the actual output contains the expected and assert the order.
2020-04-25 18:43:48 -04:00
Frank Yung-Fong Tang
21440c733c
Change compareArray to allow new property
...
Change the compareArray to code which allow new property but still assert the actual output contains the expected and assert the order.
2020-04-25 18:43:48 -04:00
Frank Yung-Fong Tang
fc55e45698
Change the compareArray to allow new property
...
Change the compareArray to code which allow new property but still assert the actual output contains the expected and assert the order.
2020-04-25 18:43:48 -04:00
Frank Yung-Fong Tang
8ad12251ae
Change compareArray to allow new property
...
Change the compareArray to code which allow new property but still assert the actual output contains the expected and assert the order.
2020-04-25 18:43:48 -04:00
Frank Yung-Fong Tang
4fb0e70db0
add "fractionalSecondDigits"
2020-04-25 18:43:48 -04:00
Frank Yung-Fong Tang
9c6ab189b7
Add fractionalSecondDigits
...
close https://github.com/tc39/test262/issues/2591
2020-04-25 18:43:48 -04:00
Jeff Walden
31dabb5618
Add a test for Unicode key-type pairs being canonicalized by Intl.Locale regardless whether they're passed in the input tag, or through the options object.
2020-04-23 10:49:48 -04:00
Frank Yung-Fong Tang
064d3c24e3
correct exceptions for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
18f55513f0
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
7bb81a4ee0
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
52ec5850d6
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
6b3b5c100a
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
7aa12918ec
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
fb00de47c0
correct expectation of exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
11cc0c03f9
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
9119877088
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
2022f97a25
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
0fc6784390
correct exceptZero expectation
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
988bf55b25
correct exceptZero expectation
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
e5d4129d37
correct for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
8293c961e9
correct expectation for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
0279d96432
correct cases for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
d4017357d8
correction for exceptZero
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
f07fe8cb1c
correct
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
c1a1111972
correct
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
832ecd285f
correct
2020-04-23 10:46:27 -04:00
Frank Yung-Fong Tang
940be668ca
correct expectation for signDisplay: "exceptZero"
2020-04-23 10:46:27 -04:00
André Bargull
18bb955771
Upstream additional language tag canonicalisation and Intl.Locale tests from SpiderMonkey
...
Adds more canonicalisation and Intl.Locale tests from:
- https://hg.mozilla.org/mozilla-central/file/tip/js/src/tests/non262/Intl/Locale
- https://hg.mozilla.org/mozilla-central/file/tip/js/src/tests/non262/Intl/
2020-04-09 09:20:55 -04:00
André Bargull
5d8e6c8e85
Restore grandfathered tests removed in #2054
...
With the move to UTS 35 for language tag processing, the expected
canonicalisation results for "cel-gaulish" should now be consistent across
implementations.
2020-04-09 09:20:55 -04:00
André Bargull
de02cf4dd5
Re-enable variant subtag canonicalisation in tests
...
UTS 35 canonicalisation requires to (again) canonicalise variant subtags.
2020-04-09 09:20:55 -04:00
André Bargull
ae8694b4b7
Copy "invalid options" test from RelativeTimeFormat to NumberFormat/DateTimeFormat
...
The invalid 'numberingSystem' options test from RelativeTimeFormat covers a few
more cases, so let's reuse it for NumberFormat and DateTimeFormat.
While there, also add tests using non-ASCII inputs.
Fixes #2540
2020-03-30 13:58:04 -04:00
Caio Lima
5d5904d69a
Adding test cases to verify that 'numberingSystem' and 'calendar' options are being mapped to lower case
2020-02-20 12:33:21 -05:00
Ms2ger
1f7f5ef23c
Change the unit in the NumberFormat unit tests.
...
This ensures https://github.com/tc39/proposal-unified-intl-numberformat/pull/93 is covered.
2020-02-06 11:09:18 -05:00
Caio Lima
6ecaf1f065
Adjusting separator character
2020-02-05 15:11:25 -05:00
Caio Lima
2e6a371f71
Adding missing 'zip' function
2020-02-05 15:11:25 -05:00
Caio Lima
1337f11e21
Adding tests to cover 'fractionalSecondDigits' on DateTimeFormat.prototype.formatRangeToParts.
2020-02-05 15:11:25 -05:00
Caio Lima
04b1d2254b
Added tests with invalid values for calendar and numberingSystem ( #2480 )
2020-01-24 14:21:33 -05:00
Ms2ger
28b4fcca4b
Add tests for the numberingSystem option to RelativeTimeFormat. ( #2459 )
...
* Add tests for the numberingSystem option to RelativeTimeFormat.
* fixup! Add tests for the numberingSystem option to RelativeTimeFormat.
2020-01-08 16:29:13 -05:00
Ms2ger
87ac236324
Add a specific test for relatedYear output. ( #2458 )
...
Based on <https://cs.chromium.org/chromium/src/v8/test/intl/date-format/related-year.js >.
Fixes #2332 .
2020-01-08 16:27:39 -05:00
Lo̹̫̦̥̬̜͈͝n̗͚̼̤ĝ̮̫͎̬̬͕̪ͫ̐̕ ͭ̊H̱̏ͬ̃ͨ̆͗o̱͚͉͉̖̰̪ͯ̈ͪ̈̎̚
cd6db88295
Fix toNumber consistency issue with boolean ( #2456 )
...
As per https://tc39.es/ecma262/#table-11 `toNumber(false)` is supposed to be `+0`
2020-01-08 16:24:19 -05:00
Ms2ger
2fb0eca404
More tests for Unified NumberFormat. ( #2454 )
2020-01-08 16:23:01 -05:00
Frank Yung-Fong Tang
31f1bb5a75
Remove date related types for Intl.DisplayNames ( #2448 )
2019-12-23 13:07:36 -05:00
Frank Yung-Fong Tang
65e996ba81
Check the step 29 of InitializeDateTimeFormat ( #2427 )
2019-12-02 10:43:53 -05:00
Leo Balter
aa9ba4b58f
Add tests for Intl.DisplayNames#resolvedOptions ( #2405 )
2019-11-13 10:50:18 -05:00
Leo Balter
21195de94c
Inital commit for Intl.DisplayNames tests ( #2404 )
2019-10-17 10:32:00 -04:00
Ms2ger
4b6efea2c6
Add more tests for DateTimeFormat.hourCycle/hour12. ( #2385 )
...
In particular, when using dateStyle/timeStyle.
See also <https://github.com/tc39/proposal-intl-datetime-style/issues/34 >.
2019-10-15 12:39:34 -04:00
Frank Yung-Fong Tang
146ef7db57
add features: [Intl.DateTimeFormat-formatRange] ( #2403 )
2019-10-10 15:27:20 -04:00
Leo Balter
98883a577e
Use canonical format for the description in the metatags ( #2401 )
...
Ref #2387
2019-10-10 11:30:26 -04:00
Leo Balter
4182972a49
Merge pull request #2396 from leobalter/2381/yaml
...
Yaml consistency
2019-10-09 13:29:16 -04:00
Frank Yung-Fong Tang
79591ae6c8
Add test for #349 and #351 PR ( #2379 )
...
Test DateTimeFormat change pattern based on calendar and output relatedYear and yearName
based on the assumption that "en-u-ca-chinese" will output 'relatedYear' and 'yearName'.
https://github.com/tc39/ecma402/pull/349
https://github.com/tc39/ecma402/pull/351
@rwaldron @leobalter @Ms2ger @littledan
2019-10-08 14:54:02 -04:00
Leo Balter
2b48ec7a00
More yaml and whitespace fixes
...
Ref #2383
2019-10-08 14:50:57 -04:00
Leo Balter
917e6f7f99
Yaml consistency
...
Ref #2381
2019-10-08 14:48:59 -04:00
Frank Yung-Fong Tang
79a01f5122
Add tests for 'numberingSystem' and 'calendar' options ( #2383 )
...
* Add tests for 'numberingSystem' option
* add constructor-numberingSystem-order.js
* correct esid
* initial actual
* add let
* add constructor-calendar-numberingSystem-order.js
2019-10-08 14:48:46 -04:00
Frank Yung-Fong Tang
b073c48b49
Add test to ensure Intl.DateTimeFormat choose pattern by calendar ( #2381 )
...
* Add test for different pattern based on calendar
* Add test for formatRangeToParts
* remove debug print
* fix typo
* fix typo
* address review feedback
* address review feedback
* change the map and use string template
* rewrite maps and use string template
2019-10-08 14:44:41 -04:00
Frank Yung-Fong Tang
8f6369d1c4
Add more tests for ListFormat ( #2387 )
...
* add tests for ListFormat
address https://github.com/tc39/test262/issues/2386
* add test for formatToParts(undefined)
* test GetIterator throw error
* test formatToParts while GetIterator throws error
* test formatToParts while step_iterator throw
* test format while iteratorStep throw
* fix object name
* test format while IteratorValue throws
* test formatToParts while iteratorValue throws
* test formatToParts while iteratorClose call return
* check format with iteratorClose calls return
2019-10-08 14:42:42 -04:00
Frank Yung-Fong Tang
2715f312db
Add tests for ListFormat StringListFromIterable ( iterable ) ( #2380 )
...
* Add tests for StringListFromIterable
* add case throw TypeError
* add test for formatToParts
* add test for formatToParts
2019-10-08 14:42:26 -04:00
Alexey Shvayka
34cbf0aed2
Add "proto-from-ctor-realm" tests for Intl proposals ( #2346 )
...
* Add Intl.Segmenter test
* Add Intl.RelativeTimeFormat test
* Add Intl.Locale test
* Add Intl.ListFormat test
2019-10-08 14:39:52 -04:00
Leo Balter
e2903e2648
Merge pull request #2366 from bocoup/unnecessary-includes
...
Remove unnecessary "includes" directives
2019-09-27 16:46:22 -04:00
Frank Yung-Fong Tang
0213936e95
remove test for abandon ecma402/pull/345 ( #2368 )
...
https://github.com/tc39/ecma402/pull/345
2019-09-26 14:23:24 -04:00
Mike Pennisi
f26c2a11bd
Remove unnecessary "includes" directives
...
The values defined by the referenced files are not used by these tests.
This makes their inclusion superfluous, which needlessly increases the
time to execute the tests and may confuse some readers.
2019-09-25 13:59:24 -04:00
Alexey Shvayka
ef7fd2bc27
Add "proto-from-ctor-realm" tests for Intl constructors ( #2334 )
...
* Rename "Object/proto-from-ctor.js" test
* Add missing "Symbol" features
* Add Intl.Collator test
* Add Intl.DateTimeFormat test
* Add Intl.NumberFormat test
* Add Intl.PluralRules test
2019-09-11 17:22:21 -03:00
André Bargull
59a1a016b7
Assign "name" property to all anonymous functions ( #2299 )
...
Implements the changes from <https://github.com/tc39/ecma262/pull/1490 >.
2019-08-15 10:58:40 -04:00
Ms2ger
70a07985a5
Unified Intl.NumberFormat: Various tests ( #2275 )
...
* Unified Intl.NumberFormat: Test compact notation with various locales.
* Unified Intl.NumberFormat: Test compactDisplay constructor option.
* Unified Intl.NumberFormat: Test signDisplay constructor option.
* Unified Intl.NumberFormat: Test signDisplay with various locales.
* Unified Intl.NumberFormat: Test signDisplay with accounting currencySign in various locales.
* Unified Intl.NumberFormat: Test engineering and scientific notations in various locales.
* Unified Intl.NumberFormat: Test unit handling.
* Unified Intl.NumberFormat: Test notation constructor option.
* Unified Intl.NumberFormat: Test engineering and scientific notations with negative exponents.
* Unified Intl.NumberFormat: Test near-zero arguments with signDisplay.
* Unified Intl.NumberFormat: Test units.
* Unified Intl.NumberFormat: Test unit arguments.
* Unified Intl.NumberFormat: Add a generic test for unit arguments.
* Unified Intl.NumberFormat: Test the unitDisplay argument.
2019-08-14 12:47:05 -04:00
André Bargull
99f75984db
Fix expected test values ( #2261 )
...
These two slipped through the cracks in #2097 :
test/intl402/Intl/getCanonicalLocales/non-iana-canon.js
- Variant subtag canonicalisation is currrently not allowed.
test/intl402/Locale/getters.js
- Only the first "loc.caseFirst" test in this file was updated in #2097 .
2019-07-30 10:53:44 -04:00
Leo Balter
1cb241cf36
Merge pull request #2097 from anba/canonical-jan2019
...
Fix various test issues (Was: Unicode BCP 47 Locale Identifier changes)
2019-07-22 08:57:24 -04:00
Frank Yung-Fong Tang
76eca53cb8
add fractionalSecondDigits.js for formatRange ( #2242 )
2019-07-22 08:54:24 -04:00
André Bargull
50331bd641
Correct expected value for Intl.Locale 'caseFirst'
...
An empty string is expected with the current proposal text.
2019-07-22 02:24:48 -07:00
André Bargull
8b725e3957
Updates test for Intl.NumberFormat Unified API Proposal changes.
2019-07-22 02:12:27 -07:00