public class Assert2
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertArrayNearlyEquals(double[] expecteds,
double[] actuals)
Returns the result of
assertArrayNearlyEquals(double[], double[], double), with
Misc.defaultMaxRelativeDiffDouble. |
static void |
assertArrayNearlyEquals(double[] expecteds,
double[] actuals,
double maxRelDiff)
Same as
assertArrayNearlyEquals(float[], float[], float), but for doubles. |
static void |
assertArrayNearlyEquals(float[] expecteds,
float[] actuals)
Returns the result of
assertArrayNearlyEquals(float[], float[], float), with
Misc.defaultMaxRelativeDiffFloat. |
static void |
assertArrayNearlyEquals(float[] expecteds,
float[] actuals,
float maxRelDiff)
Asserts that two float arrays are nearly equal by comparing analogous elements in the two arrays with
Misc.nearlyEquals(float, float, float). |
static void |
assertNearlyEquals(double expected,
double actual)
Returns the result of
assertNearlyEquals(double, double, double), with
Misc.defaultMaxRelativeDiffDouble. |
static void |
assertNearlyEquals(double expected,
double actual,
double maxRelDiff)
Same as
assertNearlyEquals(float, float, float), but for doubles. |
static void |
assertNearlyEquals(float expected,
float actual)
Returns the result of
assertNearlyEquals(float, float, float), with
Misc.defaultMaxRelativeDiffFloat. |
static void |
assertNearlyEquals(float expected,
float actual,
float maxRelDiff)
Asserts that two floats are
nearly equal. |
public static void assertNearlyEquals(float expected,
float actual)
assertNearlyEquals(float, float, float), with
Misc.defaultMaxRelativeDiffFloat.public static void assertNearlyEquals(float expected,
float actual,
float maxRelDiff)
nearly equal. If they are not,
an AssertionError is thrown.expected - expected valueactual - the value to check against expectedmaxRelDiff - the maximum relative difference the two numbers may have and still be considered equal.public static void assertNearlyEquals(double expected,
double actual)
assertNearlyEquals(double, double, double), with
Misc.defaultMaxRelativeDiffDouble.public static void assertNearlyEquals(double expected,
double actual,
double maxRelDiff)
assertNearlyEquals(float, float, float), but for doubles.public static void assertArrayNearlyEquals(float[] expecteds,
float[] actuals)
assertArrayNearlyEquals(float[], float[], float), with
Misc.defaultMaxRelativeDiffFloat.public static void assertArrayNearlyEquals(float[] expecteds,
float[] actuals,
float maxRelDiff)
Misc.nearlyEquals(float, float, float). If they are not, an AssertionError is thrown.expecteds - float array with expected values.actuals - float array with actual valuesmaxRelDiff - the maximum relative difference that analogous array elements may have and still be
considered equal.public static void assertArrayNearlyEquals(double[] expecteds,
double[] actuals)
assertArrayNearlyEquals(double[], double[], double), with
Misc.defaultMaxRelativeDiffDouble.public static void assertArrayNearlyEquals(double[] expecteds,
double[] actuals,
double maxRelDiff)
assertArrayNearlyEquals(float[], float[], float), but for doubles.