diff options
Diffstat (limited to 'android/guava-tests/test/com/google/common/math/QuantilesTest.java')
-rw-r--r-- | android/guava-tests/test/com/google/common/math/QuantilesTest.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/android/guava-tests/test/com/google/common/math/QuantilesTest.java b/android/guava-tests/test/com/google/common/math/QuantilesTest.java index 77c70207c..9c8d8e65a 100644 --- a/android/guava-tests/test/com/google/common/math/QuantilesTest.java +++ b/android/guava-tests/test/com/google/common/math/QuantilesTest.java @@ -41,8 +41,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; -import javax.annotation.CheckForNull; import junit.framework.TestCase; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Quantiles}. @@ -92,7 +92,7 @@ public class QuantilesTest extends TestCase { Correspondence.from( new BinaryPredicate<Double, Double>() { @Override - public boolean apply(@CheckForNull Double actual, @CheckForNull Double expected) { + public boolean apply(@Nullable Double actual, @Nullable Double expected) { // Test for equality to allow non-finite values to match; otherwise, use the finite // test. return actual.equals(expected) @@ -424,12 +424,12 @@ public class QuantilesTest extends TestCase { 1, 1.5, 2, 2.0, 8, 5.0, - 9, POSITIVE_INFINITY, // interpolating between 5.0 and POSITIVE_INFNINITY + 9, POSITIVE_INFINITY, // interpolating between 5.0 and POSITIVE_INFINITY 10, POSITIVE_INFINITY); } public void testScale_index_compute_doubleCollection_positiveInfinity() { - // interpolating between 5.0 and POSITIVE_INFNINITY + // interpolating between 5.0 and POSITIVE_INFINITY assertThat(Quantiles.scale(10).index(9).compute(ONE_TO_FIVE_AND_POSITIVE_INFINITY)) .isPositiveInfinity(); } @@ -442,7 +442,7 @@ public class QuantilesTest extends TestCase { .comparingValuesUsing(QUANTILE_CORRESPONDENCE) .containsExactly( 0, NEGATIVE_INFINITY, - 1, NEGATIVE_INFINITY, // interpolating between NEGATIVE_INFNINITY and 1.0 + 1, NEGATIVE_INFINITY, // interpolating between NEGATIVE_INFINITY and 1.0 2, 1.0, 8, 4.0, 9, 4.5, @@ -450,7 +450,7 @@ public class QuantilesTest extends TestCase { } public void testScale_index_compute_doubleCollection_negativeInfinity() { - // interpolating between NEGATIVE_INFNINITY and 1.0 + // interpolating between NEGATIVE_INFINITY and 1.0 assertThat(Quantiles.scale(10).index(1).compute(ONE_TO_FIVE_AND_NEGATIVE_INFINITY)) .isNegativeInfinity(); } @@ -540,7 +540,7 @@ public class QuantilesTest extends TestCase { // Assert that the dataset contains the same elements after the in-place computation (although // they may be reordered). We only do this for one index rather than for all indexes, as it is - // quite expensives (quadratic in the size of PSEUDORANDOM_DATASET). + // quite expensive (quadratic in the size of PSEUDORANDOM_DATASET). double[] dataset = Doubles.toArray(PSEUDORANDOM_DATASET); @SuppressWarnings("unused") double actual = percentiles().index(33).computeInPlace(dataset); |