Skip to content

Add comprehensive tests for RoundBank (Banker's Rounding)#422

Open
walle250ai wants to merge 1 commit intoshopspring:masterfrom
walle250ai:feature/roundbank-tests
Open

Add comprehensive tests for RoundBank (Banker's Rounding)#422
walle250ai wants to merge 1 commit intoshopspring:masterfrom
walle250ai:feature/roundbank-tests

Conversation

@walle250ai
Copy link
Copy Markdown

Summary

  • RoundBank already exists in the codebase with a correct implementation
  • Add comprehensive unit tests covering all key scenarios:
    • Positive/negative midpoint values (2.5→2, 3.5→4, -2.5→-2, -3.5→-4)
    • Decimal midpoints with 1+ places (2.45→2.4, 2.55→2.6)
    • Non-midpoint values (standard rounding behavior)
    • places=0 edge cases including zero
    • Multi-decimal precision cases
    • Negative places (rounding to tens, hundreds)
    • High-precision decimals (π approximation)

Supplement unit tests covering positive/negative midpoints, non-midpoint
values, places=0, multi-decimal, negative places, and high-precision cases.
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.

1 participant