Skip to content
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

Merged
merged 3 commits into from
Feb 22, 2022
Merged

Conversation

romulocintra
Copy link
Member

Closes #81

@@ -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_.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sffc this would be enough to solve the #81 ? Or we should further validate if values MaxFDigits/ MinFDigits before throw

@romulocintra romulocintra requested a review from sffc February 10, 2022 09:04
@@ -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.
Copy link
Collaborator

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_.
Copy link
Collaborator

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

@romulocintra romulocintra requested a review from sffc February 21, 2022 10:05
@romulocintra romulocintra merged commit b419e7f into tc39:master Feb 22, 2022
FrankYFTang added a commit to FrankYFTang/test262 that referenced this pull request Apr 20, 2022
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
@FrankYFTang
Copy link
Contributor

@romulocintra please review tc39/test262#3494

rwaldron pushed a commit to tc39/test262 that referenced this pull request Apr 25, 2022
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
kangwoosukeq pushed a commit to prosyslab/v8 that referenced this pull request Apr 28, 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}
catamorphism pushed a commit to nicolo-ribaudo/test262 that referenced this pull request May 30, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throw roundingIncrement if maximumFractionDigits is not 0
3 participants