[LANG-380] tests

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@599499 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Matthew Jason Benson 2007-11-29 16:25:30 +00:00
parent b124f18766
commit dab1bdfc0f
1 changed files with 12 additions and 0 deletions

View File

@ -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() {