XenoAmess commented on a change in pull request #83:
URL: https://github.com/apache/commons-numbers/pull/83#discussion_r476677533
##########
File path:
commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/BigFractionTest.java
##########
@@ -778,4 +780,15 @@ void testMath340() {
fractionA.getDenominator().multiply(fractionB.getDenominator()));
Assertions.assertEquals(correctResult, errorResult);
}
+
+ @Test
+ void testNumbers150(){
+ // zero to negative powers should throw an exception
+ assertThrows(ArithmeticException.class, () ->
BigFraction.ZERO.pow(-1));
+ assertThrows(ArithmeticException.class, () ->
BigFraction.ZERO.pow(Integer.MIN_VALUE));
Review comment:
@aherbert done.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]