* 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
* 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
* Remove duplicate test
The behavior under test is verified by another file in Test262:
test/language/expressions/compound-assignment/S11.13.2_A2.1_T3.3.js
That version is preferable because it does not depend on `eval` and
because it supports both strict and non-strict mode.
* Remove overly-permissive test
By asserting only the presence of an "own" property, this test can be
satisfied from both strict mode code and non-strict mode code.
The following test verifies the presence of the "own" property and the
associated descriptor's values in strict mode:
test/language/arguments-object/10.6-13-c-3-s.js
That subsumes the semantics verified by this test, making it
superfluous. Remove the test.
* Remove overly-permissive test
By asserting only the absence of a syntax error, this test can be
satisfied from both strict mode code and non-strict mode code.
The following test verifies the runtime behavior of accessing the
property in strict mode code:
test/language/arguments-object/10.6-13-c-1-s.js
That subsumes the semantics verified by this test, making it
superfluous. Remove the test.
* Remove duplicate test
The behavior under test is verified by another file in Test262:
test/built-ins/Math/prop-desc.js
That version is preferable because it follows the test suite's
convention for testing property descriptors and because it supports both
strict and non-strict mode.
* Remove duplicate test
The behavior under test is verified by two separate files:
test/language/statements/function/line-terminator-non-strict.js
test/language/statements/function/line-terminator-strict.js
These files differ only in their usage of the `noStrict`/`onlyStrict`
metadata. Because tests are intended to be interpreted in both modes by
default, these can be expressed with a single file that does not limit
the permissible modes.
Prior to this patch, the modified test would pass if no exception was
produced. Use the `assert.throws` utility function to concisely express
the expectation more completely.
Prior to the application of this patch, the modified test template
included an unintentional syntax error. This caused all generated tests
to spuriously satisfy the expectation for an error.
Correct the syntax in the test template and regenerate the tests,
ensuring that when engines report a syntax error, they are demonstrating
the behavior which the tests were designed to verify.
Previously, these tests were limited to strict mode. The syntactic
restriction under test also applied outside of strict mode even when
Annex B is observed, so configure the tests to also run outside of
strict mode.
Prior to this commit, the descriptors of the constructor properties of
the global object were verified inconsistently, many independent
assertions occured in the same file, and that file test was poorly
located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
Prior to this commit, the descriptors of the function properties of the
global object were verified inconsistently, many independent assertions
occured in the same file, and that file test was poorly located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
Prior to this commit, the enumerability of the value properties of the
global object were only verified in strict mode, the assertions occured
in the same file, and that file test was poorly located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
The modified tests are equally valid in strict mode and outside of
strict mode. Remove the flag which limits their use to only one of these
two contexts. Rename tests using the legacy ES5-based naming scheme to
remove the pattern which designates strict mode.
The `$DETACHBUFFER` function is the preferred mechanism for detaching
array buffers.
Likewise, `verifyNotWritable` is the preferred mechanism for asserting
lack of writability.
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.
* Introduce `assert._toString`
* Use `assert._toString` in `assert`
* Use `assert._toString` in `assert.sameValue`
* Use `assert._toString` in `assert.notSameValue`
* 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
* Added abrupt completition into PrivateFieldSet and PrivateFieldGet
* Adding abrupt completition for computed property evaluation
* Added case to cover abrupt completition on field initializer
* Fixing typo for 'complition' word
* Fixing typo into setter and getter description
* Fixing broken test abrupt-completition-on-field-initializer.js
* Fixing NITs
* Fixing typo of completion
* Added missing cases for name into variations of private method definition
* Generated tests
* Fixing broken case 'private-async-generator-method-name'
This came up with a V8 bug where private fields weren't resolved
properly from nested classes where both the inner and the outer class
had private fields.
* Rename & improve "length" test
* Use verifyProperty in "name" test
* Rename & improve property descriptor test
* Remove duplicated test
https://github.com/tc39/test262/blob/master/test/built-ins/Object/prototype/toString/proxy-array.js
* Rename proxy value test
* Rename & improve String object unwrapping test
* Rename & improve Number object unwrapping test
* Rename & improve Boolean object unwrapping test
* Rename & merge replacer returns undefined tests
* Rename & merge replacer function tests
* Rename replacer array revoked proxy test
* Add cross-realm replacer array revoked proxy test
* Add array proxy replacer test
* Add replacer array keys order test
* Add empty replacer array test
* Add non-finite numbers serialization test
* Add replacer array abrupt completion test
* Add replacer array with duplicates test
* Add replacer array ignores undefined test
* Add replacer array unwraps strings test
* Add replacer array unwraps numbers test
* Rename & merge circular object tests
* Add circular array test
* Rename & merge top-level primitives tests
* Rename string escape tests
* Rename BigInt tests
* Rename & improve function value test
* Add replacer function abrupt test
* Rename & merge wrong space type tests
* Rename float number space test
* Rename & improve Number object space test
* Rename & improve String object space test
* Rename basic numeric space test
* Rename string space slice test
* Add replacer array numbers test
* Add toJSON abrupt completions test
* Add not callable toJSON test
* Add toJSON call arguments test
* Add replacer array wrong types test
* Rename & improve string space test
* Rename & improve replacer wrong type test
* Add built-in object requirements test
* Add basic toJSON result test
* Add abrupt array value test
* Add abrupt object value test
* Rename & merge space number clamp tests
* Add replacer function wrapper test
* Add symbol value test
* Add negative zero value test
* Add replacer function & toJSON test
* Add circular object from toJSON test
* Add circular array from toJSON test
* Add circular object from replacer test
* Add circular array from replacer test
* Add replacer function arguments test
* Split & improve proxy value test
* Split & improve revoked proxy value test
* 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.
Due to changing idempotenxy for dynamic import on failures these tests are no longer needed.
After tc39/ecma262#1645 idempotency is only required after completing normally.
* Added cases to cover public static field initializer operations with 'this' biding.
* Added initializer that throws.
* Adding missing ';'
* Fixing broken test static-field-initializer-error.js. 'function' keyword
was missing.
* Adding case where PrivateName is used inside computed property.
* Adding proper description to early errors on usage of undeclared private names inside computed property.
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.
The template file violated the conventions from "src/class-elements/conventions.md".
Specifically there must be a global `C` variable, but default exports don't
create a global variable binding. There is no easy way to refer to the current
module and by that retrieve the default export, therefore the template was
removed.
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.
constructor-non-iana-canon.js
- Variant subtag canonicalisation is currently no longer present.
constructor-options-region-valid.js
- Digit region codes are now canonicalised.
constructor-tag.js
- Variant subtags are now sorted alphabetically.
likely-subtags-grandfathered.js
- "cmn" is now canonicalised to "zh".
This test started failing when updating to ICU 64, because ICU supports "zh"
and "zh-Hans-CN", but not explicitly also "zh-Hans", which is required for this
test to pass. The same kind of error is reproducible with ICU <64 when "Guru"
is added to the list of script codes in 'testIntl.js', because ICU supports
"pa-Guru-IN", but "pa-IN" isn't explicitly supported, too.
So, change this test to also check 'byFallback' to see if a locale is supported.
Drive-by change:
- Modernise the test to make it more readable how subtags are combined.
- Also add "419" to the list of region codes to cover the digit region syntax.
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
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
* Move proxies with non-string toStringTag to separate file
* Add coverage for async proxy functions
* Add coverage for built-ins with non-string toStringTag
* Move async proxy function tests to new file
The following lines expect each unit has property "-1" and "1"
```
const expected = unit in exceptions
? [exceptions[unit]["1"], exceptions[unit]["0"], exceptions[unit]["0"], exceptions[unit]["-1"]]
: [`in 1 ${unit}`, `in 0 ${unit}s`, `0 ${unit}s ago`, `1 ${unit} ago`];
```