Package com.google.common.truth
Class PrimitiveDoubleArraySubject
java.lang.Object
com.google.common.truth.Subject<AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>,double[]>
com.google.common.truth.AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>
com.google.common.truth.PrimitiveDoubleArraySubject
public class PrimitiveDoubleArraySubject
extends AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>
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.- Author:
- Christian Gruber (cgruber@israfil.net)
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.HasField -
Field Summary
Fields inherited from class com.google.common.truth.Subject
failureStrategy -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.voidA proposition that the provided double[] is an array of the same length and type, and contains elements such that each element inexpectedis equal to each element in the subject, and in the same position.voidisNotEqualTo(Object expected) Deprecated.voidisNotEqualTo(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 StringMethods inherited from class com.google.common.truth.AbstractArraySubject
getDisplaySubject, hasLength, isEmpty, isNotEmpty, namedMethods inherited from class com.google.common.truth.Subject
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hasField, hashCode, internalCustomName, is, isA, isInstanceOf, isNotA, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, labeled
-
Method Details
-
underlyingType
-
listRepresentation
-
isEqualTo
Deprecated.This form is unsafe for double-precision floating point types, and will throw anUnsupportedOperationException.- Overrides:
isEqualToin classSubject<AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>, double[]>
-
isEqualTo
A proposition that the provided double[] is an array of the same length and type, and contains elements such that each element inexpectedis equal to each element in the subject, and in the same position. -
isNotEqualTo
Deprecated.This form is unsafe for double-precision floating point types, and will throw anUnsupportedOperationException.- Overrides:
isNotEqualToin classSubject<AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>, double[]>
-
isNotEqualTo
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.
-
isEqualTo(Object, double)