diff --git a/src/test/org/apache/commons/lang/math/FractionTest.java b/src/test/org/apache/commons/lang/math/FractionTest.java index a01873dab..e5e6ed4cb 100644 --- a/src/test/org/apache/commons/lang/math/FractionTest.java +++ b/src/test/org/apache/commons/lang/math/FractionTest.java @@ -642,6 +642,18 @@ public class FractionTest extends TestCase { assertEquals(2, result.getNumerator()); assertEquals(3, result.getDenominator()); assertSame(f, result); + + f = Fraction.getFraction(0, 1); + result = f.reduce(); + assertEquals(0, result.getNumerator()); + assertEquals(1, result.getDenominator()); + assertSame(f, result); + + f = Fraction.getFraction(0, 100); + result = f.reduce(); + assertEquals(0, result.getNumerator()); + assertEquals(1, result.getDenominator()); + assertSame(result, Fraction.ZERO); } public void testInvert() {