Class PrimitiveFloatArraySubject
java.lang.Object
com.google.common.truth.Subject<AbstractArraySubject<PrimitiveFloatArraySubject, float[]>, float[]>
com.google.common.truth.AbstractArraySubject<PrimitiveFloatArraySubject, float[]>
com.google.common.truth.PrimitiveFloatArraySubject
public class PrimitiveFloatArraySubject
extends AbstractArraySubject<PrimitiveFloatArraySubject, float[]>
A Subject to handle testing propositions for
float[].
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.-
Nested Class Summary
Nested classes/interfaces inherited from class Subject
Subject.HasField -
Field Summary
Fields inherited from class Subject
failureStrategy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ListSubject<?, Float, List<Float>> asList()voidDeprecated.voidA proposition that the provided float[] 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.useinvalid reference
#isNotEqualTo(Object, double)voidisNotEqualTo(Object expectedArray, float tolerance) protected StringMethods inherited from class AbstractArraySubject
failWithBadType, getDisplaySubject, hasLength, isEmpty, isNotEmpty, namedMethods inherited from class Subject
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hasField, hashCode, internalCustomName, is, isA, isInstanceOf, isNotA, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, labeled
-
Constructor Details
-
PrimitiveFloatArraySubject
PrimitiveFloatArraySubject(FailureStrategy failureStrategy, float[] o)
-
-
Method Details
-
underlyingType
- Specified by:
underlyingTypein classAbstractArraySubject<PrimitiveFloatArraySubject, float[]>
-
listRepresentation
- Specified by:
listRepresentationin classAbstractArraySubject<PrimitiveFloatArraySubject, float[]>
-
isEqualTo
Deprecated.useinvalid reference
#isEqualTo(Object, double)This form is unsafe for floating point types, and will throw anUnsupportedOperationException.- Overrides:
isEqualToin classSubject<AbstractArraySubject<PrimitiveFloatArraySubject, float[]>, float[]>
-
isEqualTo
A proposition that the provided float[] 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.useinvalid reference
#isNotEqualTo(Object, double)This form is unsafe for floating point types, and will throw anUnsupportedOperationException.- Overrides:
isNotEqualToin classSubject<AbstractArraySubject<PrimitiveFloatArraySubject, float[]>, float[]>
-
isNotEqualTo
-
asList
-
invalid reference