ps1.test
Class RatNumTest

java.lang.Object
  extended by ps1.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
Constructor and Description
RatNumTest()
           
 
Method Summary
Modifier and Type Method and Description
 void testAddComplex()
           
 void testAddImproper()
           
 void testAddOnNaN()
           
 void testAddSimple()
           
 void testAddTransitively()
           
 void testCompareToFract()
           
 void testCompareToNaNs()
           
 void testCompareToNonFract()
           
 void testCompareToReflexive()
           
 void testDivComplex()
           
 void testDivImproper()
           
 void testDivOnNaN()
           
 void testDivSimple()
           
 void testDivTransitively()
           
 void testDoubleValue()
           
 void testEquals()
           
 void testEqualsReflexive()
          This test check is equals is reflexive.
 void testFloatValue()
           
 void testIntValue()
           
 void testIsNaN()
           
 void testIsPosAndIsNeg()
           
 void testMulComplex()
           
 void testMulImproper()
           
 void testMulOnNaN()
           
 void testMulProperties()
           
 void testMulSimple()
           
 void testMulTransitively()
           
 void testNegate()
           
 void testOneArgConstructor()
           
 void testSubComplex()
           
 void testSubImproper()
           
 void testSubOnNaN()
           
 void testSubSimple()
           
 void testSubTransitively()
           
 void testToStringFractions()
           
 void testToStringNaN()
           
 void testToStringSimple()
           
 void testTwoArgConstructor()
           
 void testValueOf()
           
 
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()

testTwoArgConstructor

public void testTwoArgConstructor()

testIsNaN

public void testIsNaN()

testIsPosAndIsNeg

public void testIsPosAndIsNeg()

testDoubleValue

public void testDoubleValue()

testFloatValue

public void testFloatValue()

testIntValue

public void testIntValue()

testEqualsReflexive

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


testEquals

public void testEquals()

testToStringSimple

public void testToStringSimple()

testToStringFractions

public void testToStringFractions()

testToStringNaN

public void testToStringNaN()

testValueOf

public void testValueOf()

testNegate

public void testNegate()

testAddSimple

public void testAddSimple()

testAddComplex

public void testAddComplex()

testAddImproper

public void testAddImproper()

testAddOnNaN

public void testAddOnNaN()

testAddTransitively

public void testAddTransitively()

testSubSimple

public void testSubSimple()

testSubComplex

public void testSubComplex()

testSubImproper

public void testSubImproper()

testSubOnNaN

public void testSubOnNaN()

testSubTransitively

public void testSubTransitively()

testMulProperties

public void testMulProperties()

testMulSimple

public void testMulSimple()

testMulComplex

public void testMulComplex()

testMulImproper

public void testMulImproper()

testMulOnNaN

public void testMulOnNaN()

testMulTransitively

public void testMulTransitively()

testDivSimple

public void testDivSimple()

testDivComplex

public void testDivComplex()

testDivImproper

public void testDivImproper()

testDivOnNaN

public void testDivOnNaN()

testDivTransitively

public void testDivTransitively()

testCompareToReflexive

public void testCompareToReflexive()

testCompareToNonFract

public void testCompareToNonFract()

testCompareToFract

public void testCompareToFract()

testCompareToNaNs

public void testCompareToNaNs()