Frank Yung-Fong Tang
92a9eca159
Add tests for ECMA402 PR 786 ( #3875 )
...
https://github.com/tc39/ecma402/pull/786
This ECMA402 PR 786 reached TC39 consensus in the July 2023 meeting
2023-07-24 17:47:19 +02:00
José Julián Espina
4a6439e4a7
Add `Array.prototype.includes` and `exponentiation` features ( #3799 )
2023-03-23 10:51:08 +01:00
Romulo Cintra
780b7b806e
Add test to approximately format
2023-02-07 17:14:06 -08:00
Timothy Flynn
f5e2214b30
Swap call order of NumberFormat's notation and roundingIncrement options
...
The order in which these options are read was changed in commit:
29acfc6c3f
2023-02-07 16:14:13 -08:00
Ms2ger
6fcebf2f85
Improve NumberFormat and DateTimeFormat tests for OrdinaryHasInstance
2023-01-03 12:40:48 -08:00
Timothy Flynn
e6c6460a5b
Update Intl.NumberFormat test with recent reorder of option evaluation
...
The order of evaluation for "notation" and "roundingIncrement" changed
in https://github.com/tc39/proposal-intl-numberformat-v3/commit/a260aa3 .
2022-12-12 12:15:53 +01:00
Timothy Flynn
f6c48f333e
Update Intl tests to recognize microsecond and nanosecond as sanctioned
...
These were added to the list of sanctioned units in a normative change:
https://github.com/tc39/ecma402/commit/f627573
2022-11-04 17:30:26 -07:00
Romulo Cintra
1714f231c7
Update:RangeError when useGrouping is string 'undefined'
2022-09-20 09:53:18 -07:00
Romulo Cintra
f1870753fa
Update Tests accoring with spec changes
2022-09-05 11:05:44 +02:00
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
Frank Yung-Fong Tang
f541d991f9
Remove comments after PR92
...
https://github.com/tc39/proposal-intl-numberformat-v3/pull/92/files
2022-07-13 08:20:44 -07:00
Frank Yung-Fong Tang
e6b4558ae8
Sync test to PR29 of numberformat-v3
...
https://github.com/tc39/proposal-intl-numberformat-v3/pull/92/files
2022-07-13 08:20:44 -07:00
Yusuke Suzuki
b2b6756044
Fix useGrouping tests based on the latest Intl.NumberFormat v3 change
...
Based on discussion[1], useGrouping computation in Intl.NumberFormat v3 is updated[2] to keep web compatibility.
This change fixes the existing test which is testing the previous behavior.
[1]: https://github.com/tc39/proposal-intl-numberformat-v3/issues/74
[2]: d13bd63f8f
2022-07-04 11:13:37 -06:00
Frank Yung-Fong Tang
13c1b3b546
Fix expectation
...
@romulocintra @sffc
2022-06-17 10:23:20 +02:00
Romulo Cintra
406ec000f2
Tests combinations max-min fractionDigits and Significant digits ( #3515 )
...
NumberFormat v3
2022-05-25 10:50:46 -07:00
Shane F. Carr
0a48029333
Fix Intl.NumberFormat roundingPriority test to reflect default values for min/max digits ( #3506 )
2022-05-04 11:31:56 -07:00
Frank Tang
576c0c0c7f
Make minimumFractionDigits = maximumFractionDigits
...
Make minimumFractionDigits equal to maximumFractionDigits while
roundingIncrement != 1 to sync with latest spec change in
https://github.com/tc39/proposal-intl-numberformat-v3/pull/85
which landed to spec text in Feb 22, 2022
2022-04-25 11:35:24 -04:00
Romulo Cintra
926b0960d7
update nfv3 test for roundingIncrement ( #3441 )
2022-03-31 14:53:20 -07:00
Romulo Cintra
81895b1543
use all values max and min fraction and significant digits
2022-03-14 16:52:38 -07:00
Frank Yung-Fong Tang
5fb0f5b6d2
Remove SPACES before features
2022-03-09 15:24:33 -05:00
Frank Yung-Fong Tang
bc4af482b0
Fix features by removing leading space
2022-03-09 15:24:33 -05:00
Yusuke Suzuki
1935e1b410
Fix Intl.NumberFormat useGrouping value tests
...
After Intl.NumberFormat v3, default useGrouping is "auto".
We also fix test/intl402/NumberFormat/test-option-useGrouping.js. After v3,
it accepts string and boolean.
2022-01-19 13:46:58 -05:00
Frank Yung-Fong Tang
9aedfd146d
replace SPACE with NBSP
...
the " " before the currency symbol and between group are actually nbsp not SPACE.
2022-01-07 13:21:05 -05:00
Frank Yung-Fong Tang
16f3f494d3
fix test
...
1. "–" => " – "
2. Move the verifyProperty after assert.sameValue because it has side effect of removing that property while it is writable.
2022-01-07 13:20:17 -05:00
Frank Yung-Fong Tang
b91167622b
add includes: [propertyHelper.js]
2022-01-07 13:20:17 -05:00
Frank Yung-Fong Tang
0b8efb9c0d
correct expectation
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
a12f375a99
remove extra "Digits"
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
fe9f29e4a8
Fix format-rounding-priority-less-precision.js
...
1. remove extra "Digits" in the spelling
2. fix the setting of minimumSignificantDigits is more precise since both will produce "1.00" w/o change
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
a665b5f3a2
fix case for roudingIncrement: 5000
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
4cc44841f6
fix test for roundingIncrement: 500
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
5ee4e0d609
change to minimumFractionDigits:1
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
a8e89964b4
set minimumFractionDigits: 1 to testing of 250
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
2d52f74d97
set minimumFractionDigits: 1
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
4719c8c2dd
adjuest setting for roundingIncrement: 25
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
9e50891a40
set minimumFractionDigits: 1 in format-rounding-increment-5
...
We need to set minimumFractionDigits: 1 for the case of {roundingIncrement: 5, maximumFractionDigits: 1} and also adjust the test expectation.
Otherwise, inside testNumberFormat , it will call getPatternParts to format 1.1 and -1.1 and cause pattern mismatch (because the result will be "1" instead of "1.1" in that configuration)
https://github.com/tc39/test262/blob/main/harness/testIntl.js#L2369
2022-01-07 13:19:07 -05:00
Frank Yung-Fong Tang
63f2c5b10f
Remove 1.1 case which should NOT throw RangeError
...
roundingIncrement: 1.1 will not throw RangeError because
1. roundingIncrement is read by calling GetNumberOption
2. GetNumberOption https://tc39.es/ecma402/#sec-getnumberoption will call DefaultNumberOption https://tc39.es/ecma402/#sec-defaultnumberoption and
3. DefaultNumberOption will call floor() in step 3.
2022-01-07 13:18:18 -05:00
Frank Yung-Fong Tang
0fe508c5f0
change notation to "standard"
...
I do not believe this setup is correct if we use notation: "compact".
in https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-setnfdigitoptions
notation is "compact"
mnsd is undefined
mxsd is undefined
mnfd is undefined
mxfd is undefined
hasSd is false
hasFd is false
needSd is false
needFd is false
so step 23 else block will be run
Set intlObj.[[RoundingType]] to morePrecision.
then in step 23 of https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/diff.html#sec-initializenumberformat
```
If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a RangeError exception.
```
2022-01-07 13:17:50 -05:00
Mike Pennisi
6c9b4de507
fixup! Add tests for "Intl NumberFormat v3" proposal
2022-01-04 09:35:13 -05:00
Mike Pennisi
d071b37f09
Add tests for "Intl NumberFormat v3" proposal
...
This patch is intended to cover only one aspect of the proposal for
ECMA402: the "new rounding/precision options" feature.
2022-01-04 09:35:13 -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
Frank Yung-Fong Tang
b9cac998df
Correct set up
2021-12-14 10:39:37 -05:00
Frank Yung-Fong Tang
6fecbe5257
correct test result in NumberFormat/...value-decimal-string.js
2021-12-14 10:39:37 -05:00
jugglinmike
4d23bbf00a
Add tests for "Intl NumberFormat v3" proposal ( #3307 )
...
* Add tests for "Intl NumberFormat v3" proposal
This patch is intended to cover only one aspect of the proposal for
ECMA402: the "interpret strings as decimals" feature.
* fixup! Add tests for "Intl NumberFormat v3" proposal
2021-12-03 19:51:57 -05:00
Frank Yung-Fong Tang
ef697bbc6d
fix en-IN expectation
2021-12-02 09:45:59 -05:00
Frank Yung-Fong Tang
54ef0b1bf4
Fix expectation of "compact" notation
2021-12-02 09:45:59 -05:00
Mike Pennisi
ae9440df36
fixup! Add tests for "Intl NumberFormat v3" proposal
2021-11-30 14:52:57 -05:00
Mike Pennisi
ef78452924
Add tests for "Intl NumberFormat v3" proposal
...
This patch is intended to cover only one aspect of the proposal for
ECMA402: the "grouping enum" feature. It also includes coverage for the
formatting option as already defined by the latest version of ECMA402.
2021-11-30 14:52:57 -05:00
André Bargull
666d62a27f
Correct negative-zero sign display tests
...
The negative sign is computed after rounding, so when the input `-0.0001` is
rounded to `-0`, the expected result should be `"0"` instead of `"-0"`.
2021-11-30 14:51:22 -05:00
Yusuke Suzuki
c124f6c037
Intl.NumberFormat v3's default roundingMode should be "halfExpand"
...
The test was using "halfExpand (default)".
2021-11-30 14:35:41 -05:00
Mike Pennisi
26f1f4567e
Add tests for "Intl NumberFormat v3" proposal
...
This patch is intended to cover only one aspect of the proposal for
ECMA402: the "negative sign display" feature.
2021-11-09 13:28:42 -05:00