public final class RatNumTest extends Object
RatNum is implemented for you, so it should already pass all the tests in this suite. This test is provided to give you (1) examples of using the RatNum class, albeit in the context of a test driver and (2) an example of a test suite.
Constructor and Description |
---|
RatNumTest() |
public RatNumTest()
public void testOneArgConstructor()
public void testTwoArgConstructorPos()
public void testTwoArgConstructorNeg()
public void testTwoArgConstructorImproperFract()
public void testTwoArgConstructorNaN()
public void testIsNaN()
public void testIsNotNaN()
public void testZeroIsNotPosNorNeg()
public void testIsNegWholeNum()
public void testIsNegFraction()
public void testIsPosWholeNum()
public void testIsPosFraction()
public void testNaNIsPos()
public void testDoubleValueSmallNum()
public void testDoubleValueWholeNumber()
public void testDoubleValueFracNumber()
public void testDoubleValueNaN()
public void testFloatValueSmallNum()
public void testFloatValueWholeNumber()
public void testFloatValueFracNumber()
public void testFloatValueNaN()
public void testIntValueUnsupported()
public void testIntValueWithOutRound()
public void testIntValueWithRoundtoPosOne()
public void testIntValueWithRoundtoNegOne()
public void testIntValueWithRoundMaxValue()
public void testIntValueWithRoundOneOverMaxValue()
public void testIntValueMaxValueDivByMaxValue()
public void testIntValueWithRoundMinValue()
public void testIntValueMinValueDivByMinValue()
public void testEqualsReflexive()
public void testEqualsSimple()
public void testEqualsSimpleWithDiffObjects()
public void testEqualsNotReducedFormOne()
public void testEqualsNotReducedFormNegOne()
public void testEqualsNotReducedFormFraction()
public void testEqualsNaN()
public void testEqualsForFalsePos()
public void testEqualsForSign()
public void testEqualsNotFalsePosWithFracs()
public void testToStringSimple()
public void testToStringFractions()
public void testToStringNaN()
public void testToStringOneDenom()
public void testToStringReduction()
public void testValueOf()
public void testValueOfPosOne()
public void testValueOfNegOne()
public void testValueOfPosTwo()
public void testValueOfOneHalf()
public void testValueOfThreeHalfs()
public void testValueOfNa()
public void testNegateNaN()
public void testNegateToPos()
public void testNegateToNeg()
public void testAddSimple()
public void testAddComplexToOne()
public void testAddComplex()
public void testAddImproper()
public void testAddOnNaN()
public void testAddTransitivelyZero()
public void testAddTransitivelyOne()
public void testAddTransitivelyWholeNum()
public void testAddTransitivelyNaN()
public void testAddTransitivelyFractions()
public void testSubSimple()
public void testSubSimpleToNeg()
public void testSubComplex()
public void testSubImproper()
public void testSubOnNaN()
public void testSubTransitivetyWholeNumsToNonZero()
public void testSubTransitivetyWholeNumsToZero()
public void testSubTransitivelyComplex()
public void testSubTransitivelyNaN()
public void testMulPropertiesZero()
public void testMulPropertiesOne()
public void testMulPropertiesNegOne()
public void testMulSimple()
public void testMulComplexToOne()
public void testMulComplexToComplex()
public void testMulImproper()
public void testMulOnNaN()
public void testMulTransitivelyToNonZero()
public void testMulTransitivelyToZero()
public void testMulTransitivelyComplex()
public void testMulTransitivelyNaN()
public void testSimpleDivToZero()
public void testDivComplex()
public void testDivImproper()
public void testDivNaN()
public void testDivOnNaN()
public void testDivTransitivelyWholeNum()
public void testDivTransitively()
public void testDivTransitivelyNaN()
public void testCompareToReflexive()
public void testCompareToNonFract()
public void testCompareToFract()
public void testCompareToNaNs()