|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.TestUtils
public class TestUtils
Method Summary | |
---|---|
static void |
assertContains(org.apache.commons.math.complex.Complex[] values,
org.apache.commons.math.complex.Complex z,
double epsilon)
Fails iff values does not contain a number within epsilon of z. |
static void |
assertContains(double[] values,
double x,
double epsilon)
Fails iff values does not contain a number within epsilon of x. |
static void |
assertContains(java.lang.String msg,
org.apache.commons.math.complex.Complex[] values,
org.apache.commons.math.complex.Complex z,
double epsilon)
Fails iff values does not contain a number within epsilon of z. |
static void |
assertContains(java.lang.String msg,
double[] values,
double x,
double epsilon)
Fails iff values does not contain a number within epsilon of x. |
static void |
assertEquals(org.apache.commons.math.complex.Complex expected,
org.apache.commons.math.complex.Complex actual,
double delta)
Verifies that real and imaginary parts of the two complex arguments differ by at most delta. |
static void |
assertEquals(double[] a,
double[] b,
double tolerance)
Verifies that two double arrays have equal entries, up to tolerance |
static void |
assertEquals(double expected,
double actual,
double delta)
Verifies that expected and actual are within delta, or are both NaN or infinities of the same sign. |
static void |
assertEquals(java.lang.String msg,
double expected,
double actual,
double delta)
Verifies that expected and actual are within delta, or are both NaN or infinities of the same sign. |
static void |
assertRelativelyEquals(double expected,
double actual,
double relativeError)
Verifies that the relative error in actual vs. |
static void |
assertRelativelyEquals(java.lang.String msg,
double expected,
double actual,
double relativeError)
Verifies that the relative error in actual vs. |
static void |
assertSame(org.apache.commons.math.complex.Complex expected,
org.apache.commons.math.complex.Complex actual)
Verifies that real and imaginary parts of the two complex arguments are exactly the same. |
static void |
assertSame(double expected,
double actual)
Verifies that the two arguments are exactly the same, either both NaN or infinities of same sign, or identical floating point values. |
static void |
checkSerializedEquality(java.lang.Object object)
Verifies that serialization preserves equals and hashCode. |
static java.lang.Object |
serializeAndRecover(java.lang.Object o)
Serializes an object to a bytes array and then recovers the object from the bytes array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void assertEquals(double expected, double actual, double delta)
public static void assertEquals(java.lang.String msg, double expected, double actual, double delta)
public static void assertSame(double expected, double actual)
public static void assertSame(org.apache.commons.math.complex.Complex expected, org.apache.commons.math.complex.Complex actual)
public static void assertEquals(org.apache.commons.math.complex.Complex expected, org.apache.commons.math.complex.Complex actual, double delta)
public static void assertEquals(double[] a, double[] b, double tolerance)
public static java.lang.Object serializeAndRecover(java.lang.Object o)
o
- object to serialize and recover
public static void checkSerializedEquality(java.lang.Object object)
object
- the object to serialize and recoverpublic static void assertRelativelyEquals(double expected, double actual, double relativeError)
expected
- expected valueactual
- observed valuerelativeError
- maximum allowable relative errorpublic static void assertRelativelyEquals(java.lang.String msg, double expected, double actual, double relativeError)
msg
- message to return with failureexpected
- expected valueactual
- observed valuerelativeError
- maximum allowable relative errorpublic static void assertContains(java.lang.String msg, org.apache.commons.math.complex.Complex[] values, org.apache.commons.math.complex.Complex z, double epsilon)
msg
- message to return with failurevalues
- complex array to searchz
- value soughtepsilon
- tolerancepublic static void assertContains(org.apache.commons.math.complex.Complex[] values, org.apache.commons.math.complex.Complex z, double epsilon)
values
- complex array to searchz
- value soughtepsilon
- tolerancepublic static void assertContains(java.lang.String msg, double[] values, double x, double epsilon)
msg
- message to return with failurevalues
- double array to searchx
- value soughtepsilon
- tolerancepublic static void assertContains(double[] values, double x, double epsilon)
values
- double array to searchx
- value soughtepsilon
- tolerance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |