Class PrimitiveFloatArraySubject.FloatArrayAsIterable
java.lang.Object
com.google.common.truth.IterableSubject.UsingCorrespondence<Float,Number>
com.google.common.truth.PrimitiveFloatArraySubject.FloatArrayAsIterable
- Enclosing class:
PrimitiveFloatArraySubject
public static final class PrimitiveFloatArraySubject.FloatArrayAsIterable
extends IterableSubject.UsingCorrespondence<Float,Number>
A partially specified check for doing assertions on the array similar to the assertions
supported for
Iterable values, in which the elements of the array under test are
compared to expected elements using either exact or tolerant float equality: see PrimitiveFloatArraySubject.usingExactEquality() and PrimitiveFloatArraySubject.usingTolerance(double). Call methods on this object to actually
execute the check.
In the exact equality case, the methods on this class which take Number arguments
only accept certain instances: again, see PrimitiveFloatArraySubject.usingExactEquality() for details.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcontainsAnyOf(float[] expected) AsIterableSubject.UsingCorrespondence.containsAnyOf(Object, Object, Object...)but taking a primitive float array.containsAtLeast(float[] expected) AsIterableSubject.UsingCorrespondence.containsAtLeast(Object, Object, Object...)but taking a primitive float array.containsExactly(float[] expected) AsIterableSubject.UsingCorrespondence.containsExactly(Object...)but taking a primitive float array.voidcontainsNoneOf(float[] excluded) AsIterableSubject.UsingCorrespondence.containsNoneOf(Object, Object, Object...)but taking a primitive float array.Methods inherited from class IterableSubject.UsingCorrespondence
contains, containsAnyIn, containsAnyIn, containsAnyOf, containsAtLeast, containsAtLeastElementsIn, containsAtLeastElementsIn, containsExactly, containsExactlyElementsIn, containsExactlyElementsIn, containsNoneIn, containsNoneIn, containsNoneOf, displayingDiffsPairedBy, displayingDiffsPairedBy, doesNotContain, equals, hashCode, toStringModifier and TypeMethodDescriptionvoidChecks that the actual iterable contains at least one element that corresponds to the given expected element.voidcontainsAnyIn(Number @Nullable [] expected) Checks that the actual iterable contains at least one element that corresponds to at least one of the expected elements.voidcontainsAnyIn(Iterable<? extends Number> expected) Checks that the actual iterable contains at least one element that corresponds to at least one of the expected elements.final voidcontainsAnyOf(Number first, Number second, Number... rest) Checks that the actual iterable contains at least one element that corresponds to at least one of the expected elements.final OrderedcontainsAtLeast(Number first, Number second, Number... rest) Checks that the actual iterable contains elements that correspond to all the expected elements, i.e. that there is a 1:1 mapping between any subset of the actual elements and the expected elements where each pair of elements correspond.containsAtLeastElementsIn(Number @Nullable [] expected) Checks that the actual iterable contains elements that correspond to all the expected elements, i.e. that there is a 1:1 mapping between any subset of the actual elements and the expected elements where each pair of elements correspond.containsAtLeastElementsIn(Iterable<? extends Number> expected) Checks that the actual iterable contains elements that correspond to all the expected elements, i.e. that there is a 1:1 mapping between any subset of the actual elements and the expected elements where each pair of elements correspond.final OrderedcontainsExactly(Number... expected) Checks that actual iterable contains exactly elements that correspond to the expected elements, i.e. that there is a 1:1 mapping between the actual elements and the expected elements where each pair of elements correspond.containsExactlyElementsIn(Number @Nullable [] expected) Checks that actual iterable contains exactly elements that correspond to the expected elements, i.e. that there is a 1:1 mapping between the actual elements and the expected elements where each pair of elements correspond.containsExactlyElementsIn(@Nullable Iterable<? extends Number> expected) Checks that actual iterable contains exactly elements that correspond to the expected elements, i.e. that there is a 1:1 mapping between the actual elements and the expected elements where each pair of elements correspond.voidcontainsNoneIn(Number @Nullable [] excluded) Checks that the subject contains no elements that correspond to any of the given elements.voidcontainsNoneIn(Iterable<? extends Number> excluded) Checks that the actual iterable contains no elements that correspond to any of the given elements.final voidcontainsNoneOf(Number first, Number second, Number... rest) Checks that the actual iterable contains no elements that correspond to any of the given elements.displayingDiffsPairedBy(Function<? super Float, ?> actualKeyFunction, Function<? super Number, ?> expectedKeyFunction) Specifies a way to pair up unexpected and missing elements in the message when an assertion fails.displayingDiffsPairedBy(Function<? super Number, ?> keyFunction) Specifies a way to pair up unexpected and missing elements in the message when an assertion fails.voiddoesNotContain(Number element) Checks that none of the actual elements correspond to the given element.final booleanDeprecated.final inthashCode()Deprecated.Object.hashCode()is not supported on Truth types.final StringtoString()Deprecated.Object.toString()is not supported on Truth subjects.
-
Method Details
-
containsAtLeast
AsIterableSubject.UsingCorrespondence.containsAtLeast(Object, Object, Object...)but taking a primitive float array. -
containsAnyOf
public void containsAnyOf(float[] expected) AsIterableSubject.UsingCorrespondence.containsAnyOf(Object, Object, Object...)but taking a primitive float array. -
containsExactly
AsIterableSubject.UsingCorrespondence.containsExactly(Object...)but taking a primitive float array. -
containsNoneOf
public void containsNoneOf(float[] excluded) AsIterableSubject.UsingCorrespondence.containsNoneOf(Object, Object, Object...)but taking a primitive float array.
-
Object.equals(Object)is not supported on Truth subjects or intermediate classes.