hw3.test
Class RatNumTest

java.lang.Object
  extended by hw3.test.RatNumTest

public final class RatNumTest
extends Object

This class contains a set of test cases that can be used to test the implementation of the RatNum class.

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 Summary
RatNumTest()
           
 
Method Summary
 void testAddComplex()
           
 void testAddComplexToOne()
           
 void testAddImproper()
           
 void testAddOnNaN()
           
 void testAddSimple()
           
 void testAddTransitivelyFractions()
           
 void testAddTransitivelyNaN()
           
 void testAddTransitivelyOne()
           
 void testAddTransitivelyWholeNum()
           
 void testAddTransitivelyZero()
           
 void testCompareToFract()
           
 void testCompareToNaNs()
           
 void testCompareToNonFract()
           
 void testCompareToReflexive()
           
 void testDivComplex()
           
 void testDivImproper()
           
 void testDivNaN()
           
 void testDivOnNaN()
           
 void testDivTransitively()
           
 void testDivTransitivelyNaN()
           
 void testDivTransitivelyWholeNum()
           
 void testDoubleValueFracNumber()
           
 void testDoubleValueNaN()
           
 void testDoubleValueSmallNum()
           
 void testDoubleValueWholeNumber()
           
 void testEqualsForFalsePos()
           
 void testEqualsForSign()
           
 void testEqualsNaN()
           
 void testEqualsNotFalsePosWithFracs()
           
 void testEqualsNotReducedFormFraction()
           
 void testEqualsNotReducedFormNegOne()
           
 void testEqualsNotReducedFormOne()
           
 void testEqualsReflexive()
          This test check is equals is reflexive.
 void testEqualsSimple()
           
 void testEqualsSimpleWithDiffObjects()
           
 void testFloatValueFracNumber()
           
 void testFloatValueNaN()
           
 void testFloatValueSmallNum()
           
 void testFloatValueWholeNumber()
           
 void testIntValueMaxValueDivByMaxValue()
           
 void testIntValueMinValueDivByMinValue()
           
 void testIntValueUnsupported()
           
 void testIntValueWithOutRound()
           
 void testIntValueWithRoundMaxValue()
           
 void testIntValueWithRoundMinValue()
           
 void testIntValueWithRoundOneOverMaxValue()
           
 void testIntValueWithRoundtoNegOne()
           
 void testIntValueWithRoundtoPosOne()
           
 void testIsNaN()
           
 void testIsNegFraction()
           
 void testIsNegWholeNum()
           
 void testIsNotNaN()
           
 void testIsPosFraction()
           
 void testIsPosWholeNum()
           
 void testMulComplexToComplex()
           
 void testMulComplexToOne()
           
 void testMulImproper()
           
 void testMulOnNaN()
           
 void testMulPropertiesNegOne()
           
 void testMulPropertiesOne()
           
 void testMulPropertiesZero()
           
 void testMulSimple()
           
 void testMulTransitivelyComplex()
           
 void testMulTransitivelyNaN()
           
 void testMulTransitivelyToNonZero()
           
 void testMulTransitivelyToZero()
           
 void testNaNIsPos()
           
 void testNegateNaN()
           
 void testNegateToNeg()
           
 void testNegateToPos()
           
 void testOneArgConstructor()
           
 void testSimpleDivToZero()
           
 void testSubComplex()
           
 void testSubImproper()
           
 void testSubOnNaN()
           
 void testSubSimple()
           
 void testSubSimpleToNeg()
           
 void testSubTransitivelyComplex()
           
 void testSubTransitivelyNaN()
           
 void testSubTransitivetyWholeNumsToNonZero()
           
 void testSubTransitivetyWholeNumsToZero()
           
 void testToStringFractions()
           
 void testToStringNaN()
           
 void testToStringOneDenom()
           
 void testToStringReduction()
           
 void testToStringSimple()
           
 void testTwoArgConstructorImproperFract()
           
 void testTwoArgConstructorNaN()
           
 void testTwoArgConstructorNeg()
           
 void testTwoArgConstructorPos()
           
 void testValueOf()
           
 void testValueOfNa()
           
 void testValueOfNegOne()
           
 void testValueOfOneHalf()
           
 void testValueOfPosOne()
           
 void testValueOfPosTwo()
           
 void testValueOfThreeHalfs()
           
 void testZeroIsNotPosNorNeg()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatNumTest

public RatNumTest()
Method Detail

testOneArgConstructor

public void testOneArgConstructor()

testTwoArgConstructorPos

public void testTwoArgConstructorPos()

testTwoArgConstructorNeg

public void testTwoArgConstructorNeg()

testTwoArgConstructorImproperFract

public void testTwoArgConstructorImproperFract()

testTwoArgConstructorNaN

public void testTwoArgConstructorNaN()

testIsNaN

public void testIsNaN()

testIsNotNaN

public void testIsNotNaN()

testZeroIsNotPosNorNeg

public void testZeroIsNotPosNorNeg()

testIsNegWholeNum

public void testIsNegWholeNum()

testIsNegFraction

public void testIsNegFraction()

testIsPosWholeNum

public void testIsPosWholeNum()

testIsPosFraction

public void testIsPosFraction()

testNaNIsPos

public void testNaNIsPos()

testDoubleValueSmallNum

public void testDoubleValueSmallNum()

testDoubleValueWholeNumber

public void testDoubleValueWholeNumber()

testDoubleValueFracNumber

public void testDoubleValueFracNumber()

testDoubleValueNaN

public void testDoubleValueNaN()

testFloatValueSmallNum

public void testFloatValueSmallNum()

testFloatValueWholeNumber

public void testFloatValueWholeNumber()

testFloatValueFracNumber

public void testFloatValueFracNumber()

testFloatValueNaN

public void testFloatValueNaN()

testIntValueUnsupported

public void testIntValueUnsupported()

testIntValueWithOutRound

public void testIntValueWithOutRound()

testIntValueWithRoundtoPosOne

public void testIntValueWithRoundtoPosOne()

testIntValueWithRoundtoNegOne

public void testIntValueWithRoundtoNegOne()

testIntValueWithRoundMaxValue

public void testIntValueWithRoundMaxValue()

testIntValueWithRoundOneOverMaxValue

public void testIntValueWithRoundOneOverMaxValue()

testIntValueMaxValueDivByMaxValue

public void testIntValueMaxValueDivByMaxValue()

testIntValueWithRoundMinValue

public void testIntValueWithRoundMinValue()

testIntValueMinValueDivByMinValue

public void testIntValueMinValueDivByMinValue()

testEqualsReflexive

public void testEqualsReflexive()
This test check is equals is reflexive. In other words that x.equals(x) is always true.


testEqualsSimple

public void testEqualsSimple()

testEqualsSimpleWithDiffObjects

public void testEqualsSimpleWithDiffObjects()

testEqualsNotReducedFormOne

public void testEqualsNotReducedFormOne()

testEqualsNotReducedFormNegOne

public void testEqualsNotReducedFormNegOne()

testEqualsNotReducedFormFraction

public void testEqualsNotReducedFormFraction()

testEqualsNaN

public void testEqualsNaN()

testEqualsForFalsePos

public void testEqualsForFalsePos()

testEqualsForSign

public void testEqualsForSign()

testEqualsNotFalsePosWithFracs

public void testEqualsNotFalsePosWithFracs()

testToStringSimple

public void testToStringSimple()

testToStringFractions

public void testToStringFractions()

testToStringNaN

public void testToStringNaN()

testToStringOneDenom

public void testToStringOneDenom()

testToStringReduction

public void testToStringReduction()

testValueOf

public void testValueOf()

testValueOfPosOne

public void testValueOfPosOne()

testValueOfNegOne

public void testValueOfNegOne()

testValueOfPosTwo

public void testValueOfPosTwo()

testValueOfOneHalf

public void testValueOfOneHalf()

testValueOfThreeHalfs

public void testValueOfThreeHalfs()

testValueOfNa

public void testValueOfNa()

testNegateNaN

public void testNegateNaN()

testNegateToPos

public void testNegateToPos()

testNegateToNeg

public void testNegateToNeg()

testAddSimple

public void testAddSimple()

testAddComplexToOne

public void testAddComplexToOne()

testAddComplex

public void testAddComplex()

testAddImproper

public void testAddImproper()

testAddOnNaN

public void testAddOnNaN()

testAddTransitivelyZero

public void testAddTransitivelyZero()

testAddTransitivelyOne

public void testAddTransitivelyOne()

testAddTransitivelyWholeNum

public void testAddTransitivelyWholeNum()

testAddTransitivelyNaN

public void testAddTransitivelyNaN()

testAddTransitivelyFractions

public void testAddTransitivelyFractions()

testSubSimple

public void testSubSimple()

testSubSimpleToNeg

public void testSubSimpleToNeg()

testSubComplex

public void testSubComplex()

testSubImproper

public void testSubImproper()

testSubOnNaN

public void testSubOnNaN()

testSubTransitivetyWholeNumsToNonZero

public void testSubTransitivetyWholeNumsToNonZero()

testSubTransitivetyWholeNumsToZero

public void testSubTransitivetyWholeNumsToZero()

testSubTransitivelyComplex

public void testSubTransitivelyComplex()

testSubTransitivelyNaN

public void testSubTransitivelyNaN()

testMulPropertiesZero

public void testMulPropertiesZero()

testMulPropertiesOne

public void testMulPropertiesOne()

testMulPropertiesNegOne

public void testMulPropertiesNegOne()

testMulSimple

public void testMulSimple()

testMulComplexToOne

public void testMulComplexToOne()

testMulComplexToComplex

public void testMulComplexToComplex()

testMulImproper

public void testMulImproper()

testMulOnNaN

public void testMulOnNaN()

testMulTransitivelyToNonZero

public void testMulTransitivelyToNonZero()

testMulTransitivelyToZero

public void testMulTransitivelyToZero()

testMulTransitivelyComplex

public void testMulTransitivelyComplex()

testMulTransitivelyNaN

public void testMulTransitivelyNaN()

testSimpleDivToZero

public void testSimpleDivToZero()

testDivComplex

public void testDivComplex()

testDivImproper

public void testDivImproper()

testDivNaN

public void testDivNaN()

testDivOnNaN

public void testDivOnNaN()

testDivTransitivelyWholeNum

public void testDivTransitivelyWholeNum()

testDivTransitively

public void testDivTransitively()

testDivTransitivelyNaN

public void testDivTransitivelyNaN()

testCompareToReflexive

public void testCompareToReflexive()

testCompareToNonFract

public void testCompareToNonFract()

testCompareToFract

public void testCompareToFract()

testCompareToNaNs

public void testCompareToNaNs()