Commit Graph

26 Commits

Author SHA1 Message Date
Leo Balter 98883a577e
Use canonical format for the description in the metatags (#2401)
Ref #2387
2019-10-10 11:30:26 -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
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
André Bargull f7e8dba39b Update tests to parse language tags as Unicode BCP 47 Locale Identifiers
harness/testIntl.js
- Add now invalid tags to getInvalidLanguageTags, these tags were previously used in test files changed in this commit.
- Update isCanonicalizedStructurallyValidLanguageTag regular expressions.

test/intl402/Intl/getCanonicalLocales/canonicalized-tags.js
- Moved five now invalid tags to getInvalidLanguageTags function in testIntl.js

test/intl402/Intl/getCanonicalLocales/preferred-grandfathered.js
- All irregular grandfathered tags are invalid now
- Regular grandfathered with extlang subtags are now also invalid
- Regular grandfathered with variant-like subtags are still valid

test/intl402/Intl/getCanonicalLocales/weird-cases.js
- Revert changes from last commit
- "x-u-foo" is now invalid and was moved to getInvalidLanguageTags function

test/intl402/ListFormat/constructor/constructor/locales-valid.js
test/intl402/RelativeTimeFormat/constructor/constructor/locales-valid.js
test/intl402/Segmenter/constructor/constructor/locales-valid.js
- Irregular grandfathered and privateuse only are no longer valid language tags

test/intl402/language-tags-canonicalized.js
- Same changes as in test/intl402/Intl/getCanonicalLocales/canonicalized-tags.js

test/intl402/language-tags-invalid.js
- Invalid tags list in this file was a subset of getInvalidLanguageTags, so replaced with getInvalidLanguageTags to get more coverage

test/intl402/language-tags-valid.js
- Same changes as in test/intl402/Intl/getCanonicalLocales/canonicalized-tags.js
2019-07-21 05:44:21 -07:00
Frank Yung-Fong Tang 611919174f correct a test case for updated list patterns (#2123)
I somehow missed the last line last time I proposed https://github.com/tc39/test262/pull/2111
2019-04-03 16:02:22 -04:00
Leo Balter 324f2916d3
Merge pull request #2119 from FrankYFTang/patch-2
Update test to allow 'narrow' style for all types
2019-04-02 14:10:24 -04:00
Frank Yung-Fong Tang 183f6d9f95 Update list pattern to sync with CLDR 35 (#2111)
CLDR 35 change "and" to "&" for the list form pattern "short"
see https://unicode.org/cldr/trac/ticket/11520
Also compare
https://www.unicode.org/repos/cldr/tags/release-34/common/main/en.xml
against
https://www.unicode.org/repos/cldr/tags/release-35-beta/common/main/en.xml

Notice the addition of
<listPattern type="standard-short">
<listPatternPart type="start">{0}, {1}</listPatternPart>
<listPatternPart type="middle">{0}, {1}</listPatternPart>
<listPatternPart type="end">{0}, & {1}</listPatternPart>
<listPatternPart type="2">{0} & {1}</listPatternPart>
</listPattern>
2019-04-02 14:09:36 -04:00
Frank Yung-Fong Tang 03c605fe3c
obsoleted test 2019-04-02 10:00:52 -07:00
Frank Yung-Fong Tang b5d5241dbe
Update test to allow 'narrow' style for all types
Based on the changes in https://github.com/tc39/proposal-intl-list-format/pull/43
We now allow  'narrow' style for all types
2019-04-02 09:57:45 -07:00
Frank Yung-Fong Tang 4f1155c566 Change tests according to ecma402/pull/278 (#2031) 2019-01-18 14:15:37 -02:00
Frank Yung-Fong Tang 23cb23b852 Move localeMatcher before type and style (#2010)
Sync with https://github.com/tc39/proposal-intl-list-format/pull/36
2019-01-17 17:02:16 -02:00
Rick Waldron 3b09d0e2b5 Eliminate false positives: Intl.* 2018-11-30 11:47:57 -05:00
Ms2ger 0dcec72e34 Intl.ListFormat: Test the order of properties in the result of resolvedOptions(). 2018-10-24 12:22:08 -04:00
André Bargull 4d6e47bca9 Change RelativeTimeFormat -> ListFormat in ListFormat test 2018-10-17 13:35:58 -04:00
André Bargull faed4fb089 Fix various test issues 2018-10-17 07:45:33 -07:00
Ms2ger e1d80f75c7 Intl.ListFormat: Add some basic tests for CanonicalizeLocaleList. 2018-10-15 13:41:46 -04:00
Ms2ger a3d91b12e5 Intl.ListFormat: Add a test for unsupported options combinations.
This was changed in https://github.com/tc39/proposal-intl-list-format/pull/27.
2018-10-15 13:40:52 -04:00
Frank Tang e5ae99c6ca Change tests to reflect https://github.com/tc39/proposal-intl-list-format/pull/27 (#1860)
* Changes Intl.ListFormat tests reflecting spec

Reflect https://github.com/tc39/proposal-intl-list-format/pull/27
while style:"narrow" and type is not "unit".

* add cases for throws

* remove commetns which cause lint error
2018-10-15 13:40:25 -04:00
Ms2ger f6dcb4fc2b Intl.ListFormat: Add some tests for the localeMatcher constructor option. (#1855)
This was added in https://github.com/tc39/proposal-intl-list-format/pull/25.

I don't know how to test that the option has any effect, so this just checks
that it is read and verified.
2018-10-15 11:04:34 -04:00
Ms2ger 9271068a83 Intl: Add tests for throwing getters in options objects. 2018-09-18 11:39:47 -04:00
Ms2ger c52f9cb769 Intl: Add tests for subclassing Locale, ListFormat and RelativeTimeFormat.
Fixes #1705.
2018-09-07 15:53:10 +02:00
Ms2ger f98218f831 Intl.ListFormat: Initial tests. (#1679) 2018-08-31 15:53:11 -04:00
Ms2ger b46778dc0f Add a test for Object.prototype.toString with Intl.ListFormat objects. 2018-07-06 12:31:16 +02:00
Ms2ger 46a0ff6e41 Add a test for Intl.ListFormat.prototype[@@toStringTag].
The specification changed in https://github.com/tc39/proposal-intl-list-format/pull/13.
2018-07-06 12:06:38 +02:00