43 Commits

Author SHA1 Message Date
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
Rick Waldron
d5ac0c348a
Transform compareArray -> assert.compareArray: test/intl402/**/*.js (#3240) 2021-10-05 22:54:01 -04:00
Mike Pennisi
d9ddf80479 Revert "Merge pull request #3219 from tc39/rwaldron/migrate-comparearray"
This reverts commit b690cb67be9b487eb10156c03e2c00869e88cc9d, reversing
changes made to 50dd431dffe5cf86e9064a652d6b01dbbe542cf0. This is
necessary because the reverted changeset reduced coverage by an unknown
extent.
2021-10-01 10:18:47 -04:00
rwaldron
4847d9db5a chore: update test/**/*.js to use assert.compareArray wherever applicable 2021-09-24 12:58:15 -04:00
André Bargull
66a3c3aa8b Add tests for Intl Enumeration API
Covers the usual surface tests and additional functionality tests which were
upstreamed from existing tests in SpiderMonkey.

Fixes #3131
2021-09-08 09:29:06 -04: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
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
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
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
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
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
André Bargull
7b556c6ff2 Intl.getCanonicalLocales changes for UTS 35
intl402/Intl/getCanonicalLocales/canonicalized-tags.js
- Sign languages are no longer canonicalised.
- Variant subtags are sorted alphabetically.

intl402/Intl/getCanonicalLocales/preferred-grandfathered.js
- Canonical form of "cel-gaulish" is "xtg-x-cel-gaulish".

intl402/Intl/getCanonicalLocales/preferred-variant.js
- Variant subtags are no longer canonicalised.
2019-07-22 02:12:18 -07: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
André Bargull
94053978bc Update language tag canonicalisation per UTS35
Main changes:
- "cmn" is now canonicalised to "zh"
- "und-x-" is prepended before grandfathered tags without modern replacements
- "und-" is prepended before privateuse-only language tags
2019-07-21 05:44:21 -07:00
Frank Yung-Fong Tang
ea31876c06 correct values matches type of languageAlias 2019-02-14 15:07:31 -05:00
Frank Yung-Fong Tang
ac45b6befe add back missed data
get all the test data from constructor-non-iana-canon.js
2019-02-14 15:07:31 -05:00
Frank Yung-Fong Tang
f2bc5fd0a3 split from likely-subtags-grandfathered.js 2019-02-14 15:07:31 -05:00
Frank Yung-Fong Tang
47efdac804 split
Split from intl402/Locale/constructor-non-iana-canon.js
2019-02-14 15:07:31 -05:00
Frank Yung-Fong Tang
b337eaf7c7 change irregular grandfather tag to it's canonical (#2048) 2019-01-28 10:59:07 -05:00
Ms2ger
11e3c5fc00 Add a test for passing Intl.Locale objects to Intl.getCanonicalLocales(). 2018-06-04 18:03:19 +02:00
Rick Waldron
fbccd8eeff Intl: PluralRules, NumberFormat, Number & getCanonicalLocales to use verifyProperty
There's a lot of work like this to do, but not enough time in the day to reach it all.
2018-05-18 12:35:06 -04:00
Ms2ger
190cf5c730 Extract list of structurally invalid tags from invalid-tags.js. 2018-05-03 14:20:39 -04:00
André Bargull
a380c6b000 Use more descriptive names for Intl test files 2017-12-21 16:46:56 -05:00
André Bargull
c81370348d No longer use testBuiltInObject for built-in objects 2017-12-21 16:46:56 -05:00
André Bargull
ecf814bb4c No longer use testBuiltInObject for built-in constructors 2017-12-21 16:46:56 -05:00
André Bargull
4337b396bd Add separate test files for property attributes of Intl properties 2017-12-21 16:46:56 -05:00
André Bargull
1abd6c6593 Extend coverage for Intl.getCanonicalLocales 2017-12-19 15:42:56 -05:00
Valerie R Young
d68faa904f regenerate tests 2017-10-17 17:47:52 -04:00
Valerie R Young
3c94ba0116 Fixup of 'Add version of intl402/6.2.3.js...' 2017-10-05 15:34:56 -04:00
André Bargull
c63cb39cbb Use assert-lib: intl402/Intl 2017-05-04 21:13:23 +02:00
jungshik
db3aa4ca4f Replace islamicc with islamic-umalqura in getCanonicalLocales/main.js (Intl402) (#789)
* Replace islamicc with islamic-umalqura

Per discussion in #743, it's implementation-dependent how ismalicc is
canonicalized. However, 'islamic-umalqura' should be treated the same
way by all implementations.

* Remove ar-ma-u-ca-islamic-umalqura per discussion
2016-12-19 11:34:35 -08:00
Leo Balter
febb11b249 Revert "islamicc should be canonicalized to islamic-civil (#747)" (#774)
This reverts commit da4f4385fdf88ff2c8acf036efaaa62f8cd6bd58.
2016-10-14 11:05:41 -07:00
jungshik
da4f4385fd islamicc should be canonicalized to islamic-civil (#747)
Moves ismalicc test out of main.js and creates a new
test, preferred-subtag.js (per RFC 5646 section 4.5 and
http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/calendar.xml
)

Fix #743
2016-09-12 12:54:55 -07:00
jungshik
fb45ed9772 Test that getCanonicalLocales() returns a mutable object. (#746)
Will fix #745

Besides, add additional checks to make sure that getCanonicalLocales()
returns an array.
2016-08-22 14:25:00 -07:00
Zibi Braniecki
aeb88953f0 Add tests for Intl.getCanonicalLocales 2016-06-07 14:52:04 -04:00
Mike Pennisi
eb644bb2da Reduce reliance on fnGlobalObject.js
This harness function is not necessary in the majority of cases in which
it is used. Remove its usage to simplify tests and decrease the amount
of domain-specific knowledge necessary to contribute to the test suite.

Persist the harness function itself for use by future tests for ES2015
modules (such a helper is necessary for tests that are interpreted as
module code).
2016-04-25 11:09:21 -07:00
André Bargull
932bd1a12c Move intl tests to sub-folders 2015-07-31 17:12:08 +02:00