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

Decimal type: constuctors, comparisons, and arithmetic #9272

Merged
merged 167 commits into from
Mar 15, 2024

Conversation

GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented Mar 4, 2024

Pull Request Description

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

Comment on lines +467 to +473
group_builder.specify "should negate values correctly" <|
Decimal.new 5 . negate . should_equal -5
Decimal.new -5 . negate . should_equal 5
Decimal.new 5.3 . negate . should_equal -5.3
Decimal.new -5.3 . negate . should_equal 5.3
Decimal.new 0 . negate . should_equal 0
Decimal.new -0 . negate . should_equal 0
Copy link
Member

Choose a reason for hiding this comment

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

What would we need to add to be able to support

d = Decimal.new 4
x = -d
x.should_equal -4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is already supported; added tests for this format.

Copy link
Member

Choose a reason for hiding this comment

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

Cool!

@GregoryTravis GregoryTravis requested a review from radeusgd March 12, 2024 19:42
Copy link
Member

@radeusgd radeusgd left a comment

Choose a reason for hiding this comment

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

Looks great 🚀

@GregoryTravis GregoryTravis added the CI: Ready to merge This PR is eligible for automatic merge label Mar 12, 2024
@GregoryTravis GregoryTravis removed the CI: Ready to merge This PR is eligible for automatic merge label Mar 13, 2024
@GregoryTravis GregoryTravis added CI: Ready to merge This PR is eligible for automatic merge CI: Clean build required CI runners will be cleaned before and after this PR is built. labels Mar 15, 2024
@GregoryTravis GregoryTravis mentioned this pull request Mar 15, 2024
6 tasks
@mergify mergify bot merged commit 9a9eff1 into develop Mar 15, 2024
40 checks passed
@mergify mergify bot deleted the wip/gmt/8982-decimal branch March 15, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants