diff options
author | Paul Duffin <paulduffin@google.com> | 2015-01-19 12:46:40 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-01-19 12:46:40 +0000 |
commit | aab56800fcb95e9b1a2d653588b14158080cc6b4 (patch) | |
tree | 7365392c3ea77742021cf187acfd465f9bb774ab /guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java | |
parent | 6fa98dbaae182b511fbeb331e08f5fb827715ea8 (diff) | |
parent | 84fb43aa6a1e752487f2624055ff26b1b6b7c043 (diff) | |
download | android_external_guava-aab56800fcb95e9b1a2d653588b14158080cc6b4.tar.gz android_external_guava-aab56800fcb95e9b1a2d653588b14158080cc6b4.tar.bz2 android_external_guava-aab56800fcb95e9b1a2d653588b14158080cc6b4.zip |
am 84fb43aa: Merge "Revert "Upgraded Guava to unmodified v14.0.1""
* commit '84fb43aa6a1e752487f2624055ff26b1b6b7c043':
Revert "Upgraded Guava to unmodified v14.0.1"
Diffstat (limited to 'guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java')
-rw-r--r-- | guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java | 65 |
1 files changed, 2 insertions, 63 deletions
diff --git a/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java b/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java index 55749b2..9219e3e 100644 --- a/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java @@ -17,7 +17,6 @@ package com.google.common.collect.testing.google; import static com.google.common.collect.testing.features.CollectionFeature.ALLOWS_NULL_VALUES; -import static com.google.common.collect.testing.features.CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION; import static com.google.common.collect.testing.features.CollectionFeature.RESTRICTS_ELEMENTS; import static com.google.common.collect.testing.features.CollectionFeature.SUPPORTS_ADD; import static com.google.common.collect.testing.features.CollectionFeature.SUPPORTS_REMOVE; @@ -25,17 +24,12 @@ import static com.google.common.collect.testing.features.CollectionSize.SEVERAL; import static com.google.common.collect.testing.features.CollectionSize.ZERO; import com.google.common.annotations.GwtCompatible; -import com.google.common.annotations.GwtIncompatible; import com.google.common.collect.Multiset; -import com.google.common.collect.Multiset.Entry; -import com.google.common.collect.testing.Helpers; import com.google.common.collect.testing.features.CollectionFeature; import com.google.common.collect.testing.features.CollectionSize; import java.lang.reflect.Method; import java.util.Arrays; -import java.util.ConcurrentModificationException; -import java.util.Iterator; import java.util.List; /** @@ -47,7 +41,7 @@ import java.util.List; * * @author Chris Povirk */ -@GwtCompatible(emulated = true) +@GwtCompatible public abstract class AbstractMultisetSetCountTester<E> extends AbstractMultisetTester<E> { /* @@ -191,32 +185,6 @@ public abstract class AbstractMultisetSetCountTester<E> assertSetCount(samples.e3, 1); } - @CollectionFeature.Require({SUPPORTS_ADD, - FAILS_FAST_ON_CONCURRENT_MODIFICATION}) - public void testSetCountZeroToOneConcurrentWithIteration() { - try { - Iterator<E> iterator = collection.iterator(); - assertSetCount(samples.e3, 1); - iterator.next(); - fail("Expected ConcurrentModificationException"); - } catch (ConcurrentModificationException expected) { - // success - } - } - - @CollectionFeature.Require({SUPPORTS_ADD, - FAILS_FAST_ON_CONCURRENT_MODIFICATION}) - public void testSetCountZeroToOneConcurrentWithEntrySetIteration() { - try { - Iterator<Entry<E>> iterator = getMultiset().entrySet().iterator(); - assertSetCount(samples.e3, 1); - iterator.next(); - fail("Expected ConcurrentModificationException"); - } catch (ConcurrentModificationException expected) { - // success - } - } - @CollectionFeature.Require(SUPPORTS_ADD) public void testSetCount_zeroToThree_supported() { assertSetCount(samples.e3, 3); @@ -252,33 +220,6 @@ public abstract class AbstractMultisetSetCountTester<E> assertSetCount(samples.e0, 0); } - @CollectionFeature.Require({SUPPORTS_REMOVE, - FAILS_FAST_ON_CONCURRENT_MODIFICATION}) - @CollectionSize.Require(absent = ZERO) - public void testSetCountOneToZeroConcurrentWithIteration() { - try { - Iterator<E> iterator = collection.iterator(); - assertSetCount(samples.e0, 0); - iterator.next(); - fail("Expected ConcurrentModificationException"); - } catch (ConcurrentModificationException expected) { - // success - } - } - - @CollectionFeature.Require({SUPPORTS_REMOVE, - FAILS_FAST_ON_CONCURRENT_MODIFICATION}) - public void testSetCountOneToZeroConcurrentWithEntrySetIteration() { - try { - Iterator<Entry<E>> iterator = getMultiset().entrySet().iterator(); - assertSetCount(samples.e0, 0); - iterator.next(); - fail("Expected ConcurrentModificationException"); - } catch (ConcurrentModificationException expected) { - // success - } - } - @CollectionSize.Require(SEVERAL) @CollectionFeature.Require(SUPPORTS_REMOVE) public void testSetCount_threeToZero_supported() { @@ -394,7 +335,6 @@ public abstract class AbstractMultisetSetCountTester<E> * assume multisets support duplicates so that the test of {@code * Multisets.forSet()} can suppress them. */ - @GwtIncompatible("reflection") public static List<Method> getSetCountDuplicateInitializingMethods() { return Arrays.asList( getMethod("testSetCount_threeToThree_removeSupported"), @@ -402,8 +342,7 @@ public abstract class AbstractMultisetSetCountTester<E> getMethod("testSetCount_threeToOne_supported")); } - @GwtIncompatible("reflection") private static Method getMethod(String methodName) { - return Helpers.getMethod(AbstractMultisetSetCountTester.class, methodName); + return Platform.getMethod(AbstractMultisetSetCountTester.class, methodName); } } |