A number of tests for ECMA402 asserted the exact contents of the array
returned by various `resolvedOptions` methods. This conflicted with the
expectation that more options will be introduced by future editions of
the specification.
Update these tests to assert property order more generically in order to
accommodate implementation of future language proposals and more closely
align with similar tests.
Update all `resolvedOptions` tests to produce more meaningful error
messages (including replacing the generic `arrayContains` assertion with
a specific assertion regarding the value of the first array element).
This reverts commit b690cb67be, reversing
changes made to 50dd431dff. This is
necessary because the reverted changeset reduced coverage by an unknown
extent.
* Change Intl.(ListFormat|DisplayNames|Segmenter)
Sync from ToObject to GetOptionsObject which throw TypeError
while the option is not object
* Add null and false to test
* 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
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.
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