public class Doubles extends RealNumbers<java.lang.Double>
Doubles.| Modifier and Type | Field and Description |
|---|---|
private static Doubles |
INSTANCE |
comparisonStrategy, failures| Constructor and Description |
|---|
Doubles() |
Doubles(ComparisonStrategy comparisonStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertEqual(AssertionInfo info,
java.lang.Double actual,
java.lang.Double expected,
Offset<java.lang.Double> 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. |
void |
assertIsCloseTo(AssertionInfo info,
java.lang.Double actual,
java.lang.Double other,
Offset<java.lang.Double> offset)
Asserts that the actual value is close to the offset.
|
static Doubles |
instance()
Returns the singleton instance of this class based on
StandardComparisonStrategy. |
protected boolean |
isEqualTo(java.lang.Double actual,
java.lang.Double 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.Double |
NaN() |
protected java.lang.Double |
zero() |
assertIsNaN, assertIsNotNaNabsDiff, assertIsBetween, assertIsCloseToPercentage, assertIsNegative, assertIsNotNegative, assertIsNotPositive, assertIsNotZero, assertIsPositive, assertIsStrictlyBetween, assertIsZero, isCloseToPercentageCommonChecksareEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertIsBetween, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparator, resetFailures, setFailuresprivate static final Doubles INSTANCE
Doubles()
public Doubles(ComparisonStrategy comparisonStrategy)
public static Doubles instance()
StandardComparisonStrategy.StandardComparisonStrategy.protected java.lang.Double NaN()
NaN in class RealNumbers<java.lang.Double>public void assertEqual(AssertionInfo info, java.lang.Double actual, java.lang.Double expected, Offset<java.lang.Double> 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 null.java.lang.AssertionError - if the actual value is not equal to the expected one.protected boolean isEqualTo(java.lang.Double actual,
java.lang.Double expected,
Offset<?> offset)
RealNumbersisEqualTo in class RealNumbers<java.lang.Double>actual - the actual value.expected - the expected value.offset - the given positive offset.public void assertIsCloseTo(AssertionInfo info, java.lang.Double actual, java.lang.Double other, Offset<java.lang.Double> offset)
NumbersassertIsCloseTo in class Numbers<java.lang.Double>info - contains information about the assertion.actual - the actual value.other - the expected value.offset - the given positive offset.