|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.jmlspecs.samples.dbc.ComplexTest
Test for the complex number types.
Class Specifications |
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT; public represents _getClass <- \typeof(this); |
Model Field Summary |
Model fields inherited from class java.lang.Object |
_getClass, objectState, theString |
Ghost Field Summary |
Ghost fields inherited from class java.lang.Object |
objectTimesFinalized, owner |
Field Summary | |
private Complex[] |
receivers
|
private static double |
tolerance
|
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
ComplexTest(String name)
Constructor for ComplexTest. |
Model Method Summary |
Model methods inherited from class java.lang.Object |
hashValue |
Method Summary | |
protected void |
approximatelyEquals(double d1,
double d2)
Check that either the numbers are equal, or StrictMath.abs(d1-d2) <= StrictMath.max(StrictMath.abs(d1), StrictMath.abs(d2))*tolerance. |
protected void |
approximatelyEquals(String msg,
double d1,
double d2)
Check that either the numbers are equal, or StrictMath.abs(d1-d2) <= StrictMath.max(StrictMath.abs(d1), StrictMath.abs(d2))*tolerance. |
static void |
main(String[] args)
|
protected void |
setUp()
Initalize the receivers array. |
void |
testAdd()
Test the method add. |
void |
testAngle()
Test the method angle. |
void |
testDiv()
Test the method div. |
void |
testEquals()
Test the method equals. |
void |
testHashCode()
Test the method hashCode. |
void |
testImaginaryPart()
Test the method imaginaryPart. |
void |
testMagnitude()
Test the method magnitude. |
void |
testMul()
Test the method mul. |
void |
testRealPart()
Test the method realPart. |
void |
testStandardizeAngle()
Test the method Polar.standardizeAngle. |
void |
testSub()
Test the method sub. |
void |
testToString()
Test the method toString. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final double tolerance
private Complex[] receivers
Constructor Detail |
public ComplexTest(String name)
name
- Method Detail |
public static void main(String[] args)
protected void approximatelyEquals(double d1, double d2)
protected void approximatelyEquals(String msg, double d1, double d2)
protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
public void testStandardizeAngle()
public void testRealPart()
public void testImaginaryPart()
public void testMagnitude()
public void testAngle()
public void testAdd()
public void testSub()
public void testMul()
public void testDiv()
public void testEquals()
public void testHashCode()
public void testToString()
|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |