garydgregory commented on PR #1790: URL: https://github.com/apache/commons-lang/pull/1790#issuecomment-5667174710
Hi @aakarsh-34 Here are some notes based on local testing: - Test coverage: The new test correctly reproduces the reported bug and checks both result components. It does not cover the full boundary behavior. Add cases for `MIN_VALUE/-6`, `MIN_VALUE/MIN_VALUE`, and retained exceptions for `MIN_VALUE/-1` and `MIN_VALUE/-3`. The existing suite already covers `MIN_VALUE/2`, exercising the new branch with a positive denominator. - Comment accuracy: The new comment describes a power-of-two denominator, but the condition accepts any even denominator. Prefer: `// Halve both operands before sign normalization to avoid negating Integer.MIN_VALUE`. The neighboring existing comment has a similar imprecision. - Test conventions: Rename `testMyReducedFractionFix` to something descriptive, such as `testReducedFactory_minValueNumeratorNegativeEvenDenominator`. Match neighboring tests by removing public, inserting a blank line before `@Test`, and placing it beside the reduced-factory tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
