diff options
Diffstat (limited to 'guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java')
-rw-r--r-- | guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java b/guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java index 7afb8c828..d92b191b1 100644 --- a/guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java @@ -23,24 +23,21 @@ import static com.google.common.collect.testing.features.CollectionSize.ZERO; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.testing.features.CollectionFeature; import com.google.common.collect.testing.features.CollectionSize; -import org.junit.Ignore; /** - * A generic JUnit test which tests {@code indexOf()} operations on a list. Can't be invoked - * directly; please see {@link com.google.common.collect.testing.ListTestSuiteBuilder}. + * A generic JUnit test which tests {@code indexOf()} operations on a list. + * Can't be invoked directly; please see + * {@link com.google.common.collect.testing.ListTestSuiteBuilder}. * * @author Chris Povirk */ @GwtCompatible -@Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests. public class ListIndexOfTester<E> extends AbstractListIndexOfTester<E> { - @Override - protected int find(Object o) { + @Override protected int find(Object o) { return getList().indexOf(o); } - @Override - protected String getMethodName() { + @Override protected String getMethodName() { return "indexOf"; } @@ -48,9 +45,9 @@ public class ListIndexOfTester<E> extends AbstractListIndexOfTester<E> { @CollectionSize.Require(absent = {ZERO, ONE}) public void testIndexOf_duplicate() { E[] array = createSamplesArray(); - array[getNumElements() / 2] = e0(); + array[getNumElements() / 2] = samples.e0; collection = getSubjectGenerator().create(array); - assertEquals( - "indexOf(duplicate) should return index of first occurrence", 0, getList().indexOf(e0())); + assertEquals("indexOf(duplicate) should return index of first occurrence", + 0, getList().indexOf(samples.e0)); } } |