-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update editorial according #81 #85
Conversation
@@ -120,6 +120,7 @@ | |||
1. Let _roundingIncrement_ be ? GetNumberOption(_options_, *"roundingIncrement"*, 1, 5000, 1). | |||
1. If _roundingIncrement_ is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a *RangeError* exception. | |||
1. If _roundingIncrement_ is not 1 and _numberFormat_.[[RoundingType]] is not ~fractionDigits~, throw a *RangeError* exception. | |||
1. If _roundingIncrement_ and _numberFormat_.[[MaximumFractionDigits]] is not equal to _numberFormat_.[[MinimumFractionDigits]], throw a *RangeError* exception. | |||
1. Set _numberFormat_.[[RoundingIncrement]] to _roundingIncrement_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
numberformat/proposed.emu
Outdated
@@ -120,6 +120,7 @@ | |||
1. Let _roundingIncrement_ be ? GetNumberOption(_options_, *"roundingIncrement"*, 1, 5000, 1). | |||
1. If _roundingIncrement_ is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a *RangeError* exception. | |||
1. If _roundingIncrement_ is not 1 and _numberFormat_.[[RoundingType]] is not ~fractionDigits~, throw a *RangeError* exception. | |||
1. If _roundingIncrement_ and _numberFormat_.[[MaximumFractionDigits]] is not equal to _numberFormat_.[[MinimumFractionDigits]], throw a *RangeError* exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_roundingIncrement_
is not a boolean; add is not 1
@@ -120,6 +120,7 @@ | |||
1. Let _roundingIncrement_ be ? GetNumberOption(_options_, *"roundingIncrement"*, 1, 5000, 1). | |||
1. If _roundingIncrement_ is not in « 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000 », throw a *RangeError* exception. | |||
1. If _roundingIncrement_ is not 1 and _numberFormat_.[[RoundingType]] is not ~fractionDigits~, throw a *RangeError* exception. | |||
1. If _roundingIncrement_ and _numberFormat_.[[MaximumFractionDigits]] is not equal to _numberFormat_.[[MinimumFractionDigits]], throw a *RangeError* exception. | |||
1. Set _numberFormat_.[[RoundingIncrement]] to _roundingIncrement_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update diff.emu to keep them in sync
Make minimumFractionDigits equal to maximumFractionDigits while roundingIncrement != 1 to sync with latest spec change in tc39/proposal-intl-numberformat-v3#85 which landed to spec text in Feb 22, 2022
@romulocintra please review tc39/test262#3494 |
Make minimumFractionDigits equal to maximumFractionDigits while roundingIncrement != 1 to sync with latest spec change in tc39/proposal-intl-numberformat-v3#85 which landed to spec text in Feb 22, 2022
PR85 tc39/proposal-intl-numberformat-v3#85 Throw RangeError while roundingIncrement is not 1 and minimumFractionDigits != maximumFractionDigits Test by new test cases in intl/number-format/rounding-increment-v3.js Add more unit test to check the resolved options of roundingIncrement, minimumFractionDigits, and maximumFractionDigits. PR91 tc39/proposal-intl-numberformat-v3#91 Throw TypeError instead of RangeError while roundingIncrement is not 1 and RoundingType is not fractionDigits Test by intl402/NumberFormat/constructor-roundingIncrement-invalid.js in test262 Bug: v8:10776 Change-Id: I071bfe8b3e844c5999144d74bb5f79ea9811e37b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3603059 Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#80196}
Make minimumFractionDigits equal to maximumFractionDigits while roundingIncrement != 1 to sync with latest spec change in tc39/proposal-intl-numberformat-v3#85 which landed to spec text in Feb 22, 2022
Closes #81