[decimal] Add tests for subtract() of BigDecimal
#68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several significant changes to the
mojoproject.tomlandtests/bigdecimalfiles, primarily adding new functionality for testing BigDecimal subtraction. The most important changes include the addition of a new test function for BigDecimal subtraction, updates to the test data, and minor modifications to existing commands.New functionality for BigDecimal subtraction:
tests/bigdecimal/test_bigdecimal_arithmetics.mojo: Added a new functiontest_subtract()to test BigDecimal subtraction with various test cases. This includes loading test cases from a TOML file, running the tests, and validating the results.Updates to test data:
tests/bigdecimal/test_data/bigdecimal_arithmetics.toml: Added a comprehensive set of test cases for BigDecimal subtraction, covering basic subtraction, different scales, sign combinations, large and small numbers, scientific notation, special cases, financial scenarios, precision boundaries, additional edge cases, and specific application domains.Minor modifications to existing commands:
mojoproject.toml: Updated the commands for running benchmarks to include aclearcommand at the beginning, ensuring a clean slate before execution.