test262 icon indicating copy to clipboard operation
test262 copied to clipboard

Intl.NumberFormat v3: Improve coverage of SetNumberFormatDigitOptions

Open sffc opened this issue 2 years ago • 1 comments

SetNumberFormatDigitOptions is a complicated part of the spec that we should ensure that implementations get right.

In particular:

  1. Ensure that all combinations of the presence of maximumFractionDigits, maximumSignificantDigits, roundingPriority: "morePrecision", roundingPriority: "lessPrecision", and notation: "compact" are tested and that they produce the expected resolvedOptions.
  2. Migrate as much of @gibson042's excellent test suite as possible; see https://github.com/tc39/ecma402/pull/575#pullrequestreview-730209467 -- note that this is based on NFv2 (current spec), not NFv3, so it may need to be updated. Alternatively, it may be useful to have the NFv2 and NFv3 tests exist in tandem.

CC @romulocintra @FrankYFTang

sffc avatar Apr 30 '22 18:04 sffc

  1. Ensure that all combinations of the presence of maximumFractionDigits, maximumSignificantDigits, roundingPriority: "morePrecision", roundingPriority: "lessPrecision", and notation: "compact" are tested and that they produce the expected resolvedOptions.

Started a Draft here combining some of the values : Todo :

  • [x] Test notation
  • [x] Add correct results

romulocintra avatar May 02 '22 15:05 romulocintra