[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:
parent
b124f18766
commit
dab1bdfc0f
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue