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:
Frank Yung-Fong Tang 2022-01-06 11:06:46 -08:00 committed by Rick Waldron
parent 63f2c5b10f
commit 9e50891a40
1 changed files with 4 additions and 4 deletions

View File

@ -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',
}
);