mirror of https://github.com/tc39/test262.git
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
This commit is contained in:
parent
63f2c5b10f
commit
9e50891a40
|
@ -15,13 +15,13 @@ var numberingSystems = ['arab', 'latn', 'thai', 'hanidec'];
|
|||
testNumberFormat(
|
||||
locales,
|
||||
numberingSystems,
|
||||
{roundingIncrement: 5, maximumFractionDigits: 1},
|
||||
{roundingIncrement: 5, maximumFractionDigits: 1, minimumFractionDigits: 1},
|
||||
{
|
||||
'1.500': '1.5',
|
||||
'1.625': '1.5',
|
||||
'1.750': '2',
|
||||
'1.875': '2',
|
||||
'2.000': '2',
|
||||
'1.750': '2.0',
|
||||
'1.875': '2.0',
|
||||
'2.000': '2.0',
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue