Commit Graph

6 Commits

Author SHA1 Message Date
Yusuke Suzuki 3c789640ec dft-currency-mnfd-range-check-mxfd.js should check maximumFractionDigits, not maximumSignificantDigits
This test is checking maximumSignificantDigits, but this is wrong. We should check maximumFractionDigits.
2020-09-28 09:09:09 -04:00
Yusuke Suzuki 3fe45c44c6 Revert "Intl.NumberFormat + currency will throw an error if maximumFractionDigits is less than currencyDigits"
This reverts commit a7b9067fe1.
I fixed the test with a7b9067fe1 based on the current spec, but this test was based on WIP spec change.
2020-09-24 14:55:28 -04:00
Yusuke Suzuki a7b9067fe1 Intl.NumberFormat + currency will throw an error if maximumFractionDigits is less than currencyDigits
In 12.1.1 SetNumberFormatDigitOptions step 12.d[1], mnfd (minimum fraction digits) becomes the same to currencyDigits (mxfdDefault in this case).
It is 2 for USD, 4 for CLF. So, if maximumFractionDigits is less than that, we should throw RangeError.

[1]: https://tc39.es/ecma402/#sec-setnfdigitoptions
2020-09-15 10:33:23 -04:00
Ujjwal Sharma 6c3f8cdc75
Update tests for tc39/ecma402#471 (#2707) 2020-08-13 10:31:24 -07: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
Daniel Ehrenberg a9d9ab1a51
Add tests for some NumberFormat options edge cases
Closes #888

These tests are regression tests for V8 failures at top of tree,
https://bugs.chromium.org/p/v8/issues/detail?id=6015
https://bugs.chromium.org/p/v8/issues/detail?id=6016

Neither issue is present in JSC or SpiderMonkey. They are fixed
by the V8 patch
https://codereview.chromium.org/2717613005
2017-03-23 11:50:33 -07:00