public class Floats extends RealNumbers<java.lang.Float>
Floats.| Constructor and Description |
|---|
Floats(ComparisonStrategy comparisonStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertEqual(AssertionInfo info,
java.lang.Float actual,
java.lang.Float expected,
Offset<java.lang.Float> offset)
Verifies that two floats are equal within a positive offset.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy. |
static Floats |
instance()
Returns the singleton instance of this class based on
StandardComparisonStrategy. |
protected boolean |
isEqualTo(java.lang.Float actual,
java.lang.Float expected,
Offset<?> offset)
Returns true if the two floats parameter are equal within a positive offset, false otherwise.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy. |
protected java.lang.Float |
NaN() |
protected java.lang.Float |
zero() |
assertIsNaN, assertIsNotNaNassertIsNegative, assertIsNotNegative, assertIsNotPositive, assertIsNotZero, assertIsPositive, assertIsZeroareEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparatorpublic Floats(ComparisonStrategy comparisonStrategy)
public static Floats instance()
StandardComparisonStrategy.StandardComparisonStrategy.protected java.lang.Float NaN()
NaN in class RealNumbers<java.lang.Float>protected boolean isEqualTo(java.lang.Float actual,
java.lang.Float expected,
Offset<?> offset)
RealNumbersisEqualTo in class RealNumbers<java.lang.Float>actual - the actual value.expected - the expected value.offset - the given positive offset.public void assertEqual(AssertionInfo info, java.lang.Float actual, java.lang.Float expected, Offset<java.lang.Float> offset)
info - contains information about the assertion.actual - the actual value.expected - the expected value.offset - the given positive offset.java.lang.NullPointerException - if the given offset is null.java.lang.AssertionError - if the actual value is not equal to the expected one.Copyright © 2007–2018. All rights reserved.