Commit Graph

31 Commits

Author SHA1 Message Date
Frank Yung-Fong Tang e41d581c6d Sync with pull/100 of intl-numberformat-v3
https://github.com/tc39/proposal-intl-numberformat-v3/pull/100/files
2022-07-25 12:40:18 -07:00
Yusuke Suzuki 6804e59f9f Fix Intl.PluralRules.selectRange test
en-US's Intl.PluralRules.selectRange(102, 201) is "other", not "few".
2022-01-04 09:33:18 -05:00
Romulo Cintra 46f847c2e8
NumberFormat v3 tests (#3283)
* feat: nfv3 plural rules

* test NaN and out of range values

* add NumberFormat v3 proposal features

* add feature to selectrange tests

* add basic test NumberFormat.formatRange

* add basic test NumberFormat.formatRangeToParts

* update Plural Rules tests

* refactor some tests

* update formatRange tests

* update formatRangeToParts tests

* update feature flag

* add locale: [en-US]

* update selectRange tests

* update tests

* update en-US tests and add pt-PT

* update prop-desc check

* validate  1.1.25_4.a

Co-authored-by: Romulo Cintra <romulocintra@gmqil.com>
2021-12-17 14:33:27 -05:00
Mike Pennisi f527a107f2 Relax tests for resolvedOptions property ordering
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).
2021-10-29 15:19:27 -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
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 8b725e3957 Updates test for Intl.NumberFormat Unified API Proposal changes. 2019-07-22 02:12:27 -07:00
Ms2ger fa16d7df3f Intl: Add tests for table iteration order.
The order was defined in <https://github.com/tc39/ecma402/pull/279>.
2018-10-17 12:59:38 -04:00
Ms2ger 9271068a83 Intl: Add tests for throwing getters in options objects. 2018-09-18 11:39:47 -04:00
Ms2ger cd6198b69c Add a test for pluralrules.resolvedOptions().pluralCategories. 2018-05-29 17:34:34 +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
Rick Waldron 92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Rick Waldron 5155397373 Add missing features 2017-12-21 16:46:57 -05:00
André Bargull 91460f90de Update property-descriptor tests to use verifyProperty 2017-12-21 16:46:56 -05:00
André Bargull b6e9f9425f Remove unused includes in Intl test files 2017-12-21 16:46:56 -05:00
André Bargull 60692bb6e0 Move remaining testBuiltInObject callers to use normal assert calls 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 513a3056fb Add separate test files to test the length property of Intl functions 2017-12-21 16:46:56 -05:00
André Bargull 72db5f1ec1 Replace mustHaveProperty with verifyProperty 2017-12-21 16:46:56 -05:00
André Bargull ce3c3d7dbd Replace mustNotHaveProperty with verifyProperty 2017-12-21 16:46:56 -05:00
André Bargull 123259733b Replace testArraysAreSame with assert.compareArray 2017-12-21 16:46:55 -05:00
André Bargull e65c65c293 Remove unused return value from testWithIntlConstructors 2017-12-21 16:46:55 -05:00
Daniel Ehrenberg 1702336a77 Test change in PluralRules default options semantics (#1350)
The change is done in the following patch, where default options
have a null prototype. This matches what other Intl objects have.
1abe8af440
2017-11-21 14:13:44 -05:00
André Bargull 0271179c4a Use assert-lib: intl402/PluralRules 2017-05-04 21:25:02 +02:00
André Bargull d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
André Bargull 3291704eb2
Fix multiple test errors
Tests doesn't use async functionality and don't call $DONE, so remove
"async" flag:
- src/params/error/async-gen-named-func-expr.template
- test/language/expressions/async-generator/params-named-dflt-abrupt.js
- test/language/expressions/async-generator/params-named-dflt-ref-later.js
- test/language/expressions/async-generator/params-named-dflt-ref-self.js

Intl.PluralRules.prototype is no longer a Intl.Prototype instance:
- test/intl402/PluralRules/prototype/prototype.js

Intl.PluralRules throws an error when called as a function:
- test/intl402/PluralRules/undefined-newtarget-throws.js

Module namespace objects call OrdinaryDelete for symbol properties:
- test/language/module-code/namespace/internals/delete-non-exported.js

Async generators no longer retrieves "done" property twice:
- src/async-generators/yield-star-async-next.case
- src/async-generators/yield-star-async-return.case
- src/async-generators/yield-star-async-throw.case

Minor units of CLF is 4, so we need to test with maximumFractionDigits=3
to get an error:
- test/intl402/NumberFormat/dft-currency-mnfd-range-check-mxfd.js

DateTimeFormat.prototype.formatToParts length property was changed from
0 to 1:
- test/intl402/DateTimeFormat/prototype/formatToParts/length.js

minimumSignificantDigits and maximumSignificantDigits properties are
only retrieved once:
- test/intl402/NumberFormat/11.1.1_32.js
2017-04-06 15:30:13 -04:00
André Bargull 6b09ad0459 Update YAML frontmatter of some tests to be compatible with monkeyYaml (#862) 2017-03-01 16:35:37 -05:00
Zibi Braniecki 82c2ca0709 Add Intl.PluralRules tests (#782)
* Add Intl.PluralRules tests

* document the tests
2017-01-18 15:56:44 -08:00