org.junit.internal.InexactComparisonCriteria Java Examples

The following examples show how to use org.junit.internal.InexactComparisonCriteria. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Assert.java    From firebase-android-sdk with Apache License 2.0 2 votes vote down vote up
/**
 * Asserts that two double arrays are equal. If they are not, an {@link AssertionError} is thrown
 * with the given message.
 *
 * @param message the identifying message for the {@link AssertionError} (<code>null</code> okay)
 * @param expecteds double array with expected values.
 * @param actuals double array with actual values
 * @param delta the maximum delta between <code>expecteds[i]</code> and <code>actuals[i]</code>
 *     for which both numbers are still considered equal.
 */
public static void assertArrayEquals(
    String message, double[] expecteds, double[] actuals, double delta)
    throws ArrayComparisonFailure {
  new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals);
}
 
Example #2
Source File: Assert.java    From firebase-android-sdk with Apache License 2.0 2 votes vote down vote up
/**
 * Asserts that two float arrays are equal. If they are not, an {@link AssertionError} is thrown
 * with the given message.
 *
 * @param message the identifying message for the {@link AssertionError} (<code>null</code> okay)
 * @param expecteds float array with expected values.
 * @param actuals float array with actual values
 * @param delta the maximum delta between <code>expecteds[i]</code> and <code>actuals[i]</code>
 *     for which both numbers are still considered equal.
 */
public static void assertArrayEquals(
    String message, float[] expecteds, float[] actuals, float delta)
    throws ArrayComparisonFailure {
  new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals);
}
 
Example #3
Source File: Assert.java    From j2cl with Apache License 2.0 2 votes vote down vote up
/**
 * Asserts that two double arrays are equal. If they are not, an
 * {@link AssertionError} is thrown with the given message.
 *
 * @param message the identifying message for the {@link AssertionError} (<code>null</code>
 * okay)
 * @param expecteds double array with expected values.
 * @param actuals double array with actual values
 * @param delta the maximum delta between <code>expecteds[i]</code> and
 * <code>actuals[i]</code> for which both numbers are still
 * considered equal.
 */
public static void assertArrayEquals(String message, double[] expecteds,
        double[] actuals, double delta) throws ArrayComparisonFailure {
    new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals);
}
 
Example #4
Source File: Assert.java    From j2cl with Apache License 2.0 2 votes vote down vote up
/**
 * Asserts that two float arrays are equal. If they are not, an
 * {@link AssertionError} is thrown with the given message.
 *
 * @param message the identifying message for the {@link AssertionError} (<code>null</code>
 * okay)
 * @param expecteds float array with expected values.
 * @param actuals float array with actual values
 * @param delta the maximum delta between <code>expecteds[i]</code> and
 * <code>actuals[i]</code> for which both numbers are still
 * considered equal.
 */
public static void assertArrayEquals(String message, float[] expecteds,
        float[] actuals, float delta) throws ArrayComparisonFailure {
    new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals);
}
 
Example #5
Source File: Assert.java    From Java-Thread-Affinity with Apache License 2.0 2 votes vote down vote up
/**
 * Asserts that two double arrays are equal. If they are not, an
 * {@link AssertionError} is thrown with the given message.
 *
 * @param message   the identifying message for the {@link AssertionError} (<code>null</code>
 *                  okay)
 * @param expecteds double array with expected values.
 * @param actuals   double array with actual values
 */
public static void assertArrayEquals(String message, double[] expecteds,
                                     double[] actuals, double delta) throws ArrayComparisonFailure {
    new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals);
}
 
Example #6
Source File: Assert.java    From Java-Thread-Affinity with Apache License 2.0 2 votes vote down vote up
/**
 * Asserts that two float arrays are equal. If they are not, an
 * {@link AssertionError} is thrown with the given message.
 *
 * @param message   the identifying message for the {@link AssertionError} (<code>null</code>
 *                  okay)
 * @param expecteds float array with expected values.
 * @param actuals   float array with actual values
 */
public static void assertArrayEquals(String message, float[] expecteds,
                                     float[] actuals, float delta) throws ArrayComparisonFailure {
    new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals);
}