|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.truth0.subjects.Subject<org.truth0.subjects.AbstractArraySubject<T>,T>
org.truth0.subjects.PrimitiveDoubleArraySubject
@GwtCompatible public class PrimitiveDoubleArraySubject
A Subject to handle testing propositions for double[]
.
Note: this class deprecates some common methods because the operation of equality and
comparison on floating point numbers requires additional specification. Alternatives
equality tests are provided.
Field Summary |
---|
Fields inherited from class org.truth0.subjects.Subject |
---|
failureStrategy |
Constructor Summary | |
---|---|
PrimitiveDoubleArraySubject(FailureStrategy failureStrategy,
double[] o)
|
Method Summary | |
---|---|
protected void |
failWithBadType(Object expected)
|
protected String |
getDisplaySubject()
|
void |
isEqualTo(Object expected)
Deprecated. use isEqualTo(Object, double) |
void |
isEqualTo(Object expected,
double tolerance)
A proposition that the provided double[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element
in the subject, and in the same position. |
void |
isNotEqualTo(Object expected)
Deprecated. use isNotEqualTo(Object, double) |
void |
isNotEqualTo(Object expectedArray,
double tolerance)
A proposition that the provided double[] is not an array of the same length or type, or has at least one element that does not pass an equality test within the given tolerance. |
protected List<Double> |
listRepresentation()
|
protected String |
underlyingType()
|
Methods inherited from class org.truth0.subjects.Subject |
---|
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hashCode, internalCustomName, is, isA, isNotA, isNotNull, isNull, labeled, named |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrimitiveDoubleArraySubject(FailureStrategy failureStrategy, double[] o)
Method Detail |
---|
protected String underlyingType()
protected List<Double> listRepresentation()
@Deprecated public void isEqualTo(Object expected)
isEqualTo(Object, double)
UnsupportedOperationException
.
isEqualTo
in class Subject<org.truth0.subjects.AbstractArraySubject<double[]>,double[]>
public void isEqualTo(Object expected, double tolerance)
expected
is equal to each element
in the subject, and in the same position.
@Deprecated public void isNotEqualTo(Object expected)
isNotEqualTo(Object, double)
UnsupportedOperationException
.
isNotEqualTo
in class Subject<org.truth0.subjects.AbstractArraySubject<double[]>,double[]>
public void isNotEqualTo(Object expectedArray, double tolerance)
protected String getDisplaySubject()
getDisplaySubject
in class Subject<org.truth0.subjects.AbstractArraySubject<T>,T>
protected void failWithBadType(Object expected)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |