hw3.test
Class RatNumTest
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RatNumTest
public RatNumTest()
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()