aboutsummaryrefslogtreecommitdiff
path: root/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java')
-rw-r--r--guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java b/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java
index 6a9eeade5..7e1173047 100644
--- a/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java
+++ b/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java
@@ -20,6 +20,7 @@ import static com.google.common.truth.Truth.assertThat;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
+import com.google.common.annotations.J2ktIncompatible;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ObjectArrays;
import com.google.common.collect.testing.ListTestSuiteBuilder;
@@ -339,7 +340,7 @@ public class ImmutableIntArrayTest extends TestCase {
AtomicInteger count = new AtomicInteger(0);
ImmutableIntArray.of(0, 1, 2, 3).forEach(i -> assertThat(i).isEqualTo(count.getAndIncrement()));
- assertEquals(4, count.get());
+ assertThat(count.get()).isEqualTo(4);
}
public void testStream() {
@@ -420,6 +421,7 @@ public class ImmutableIntArrayTest extends TestCase {
assertActuallyTrims(underSized);
}
+ @J2ktIncompatible
@GwtIncompatible // SerializableTester
public void testSerialization() {
assertThat(reserialize(ImmutableIntArray.of())).isSameInstanceAs(ImmutableIntArray.of());
@@ -444,6 +446,7 @@ public class ImmutableIntArrayTest extends TestCase {
assertThat(iia.trimmed()).isSameInstanceAs(iia);
}
+ @J2ktIncompatible
@GwtIncompatible // suite
public static Test suite() {
List<ListTestSuiteBuilder<Integer>> builders =
@@ -475,6 +478,7 @@ public class ImmutableIntArrayTest extends TestCase {
return suite;
}
+ @J2ktIncompatible
@GwtIncompatible // used only from suite
private static ImmutableIntArray makeArray(Integer[] values) {
return ImmutableIntArray.copyOf(Arrays.asList(values));
@@ -483,6 +487,7 @@ public class ImmutableIntArrayTest extends TestCase {
// Test generators. To let the GWT test suite generator access them, they need to be public named
// classes with a public default constructor (not that we run these suites under GWT yet).
+ @J2ktIncompatible
@GwtIncompatible // used only from suite
public static final class ImmutableIntArrayAsListGenerator extends TestIntegerListGenerator {
@Override
@@ -491,6 +496,7 @@ public class ImmutableIntArrayTest extends TestCase {
}
}
+ @J2ktIncompatible
@GwtIncompatible // used only from suite
public static final class ImmutableIntArrayHeadSubListAsListGenerator
extends TestIntegerListGenerator {
@@ -502,6 +508,7 @@ public class ImmutableIntArrayTest extends TestCase {
}
}
+ @J2ktIncompatible
@GwtIncompatible // used only from suite
public static final class ImmutableIntArrayTailSubListAsListGenerator
extends TestIntegerListGenerator {
@@ -513,6 +520,7 @@ public class ImmutableIntArrayTest extends TestCase {
}
}
+ @J2ktIncompatible
@GwtIncompatible // used only from suite
public static final class ImmutableIntArrayMiddleSubListAsListGenerator
extends TestIntegerListGenerator {
@@ -525,11 +533,13 @@ public class ImmutableIntArrayTest extends TestCase {
}
}
+ @J2ktIncompatible
@GwtIncompatible // used only from suite
private static Integer[] concat(Integer[] a, Integer[] b) {
return ObjectArrays.concat(a, b, Integer.class);
}
+ @J2ktIncompatible
@GwtIncompatible // used only from suite
public abstract static class TestIntegerListGenerator implements TestListGenerator<Integer> {
@Override
@@ -565,6 +575,7 @@ public class ImmutableIntArrayTest extends TestCase {
}
}
+ @J2ktIncompatible
@GwtIncompatible // used only from suite
public static class SampleIntegers extends SampleElements<Integer> {
public SampleIntegers() {