| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package com.google.common.collect.testing; |
| 18 |
|
| 19 |
import static com.google.common.collect.Lists.newArrayList; |
| 20 |
import static com.google.common.collect.testing.testers.CollectionAddAllTester.getAddAllUnsupportedNonePresentMethod; |
| 21 |
import static com.google.common.collect.testing.testers.CollectionAddAllTester.getAddAllUnsupportedSomePresentMethod; |
| 22 |
import static com.google.common.collect.testing.testers.CollectionAddTester.getAddUnsupportedNotPresentMethod; |
| 23 |
import static com.google.common.collect.testing.testers.CollectionCreationTester.getCreateWithNullUnsupportedMethod; |
| 24 |
import static com.google.common.collect.testing.testers.MapCreationTester.getCreateWithNullKeyUnsupportedMethod; |
| 25 |
import static com.google.common.collect.testing.testers.MapEntrySetTester.getContainsEntryWithIncomparableKeyMethod; |
| 26 |
import static com.google.common.collect.testing.testers.MapEntrySetTester.getContainsEntryWithIncomparableValueMethod; |
| 27 |
import static com.google.common.collect.testing.testers.MapPutAllTester.getPutAllNullKeyUnsupportedMethod; |
| 28 |
import static com.google.common.collect.testing.testers.MapPutTester.getPutNullKeyUnsupportedMethod; |
| 29 |
|
| 30 |
import java.lang.reflect.Method; |
| 31 |
import java.util.Arrays; |
| 32 |
import java.util.Collection; |
| 33 |
import java.util.List; |
| 34 |
import java.util.Map; |
| 35 |
import junit.framework.Test; |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
public class OpenJdk6MapTests extends TestsForMapsInJavaUtil { |
| 48 |
public static Test suite() { |
| 49 |
return new OpenJdk6MapTests().allTests(); |
| 50 |
} |
| 51 |
|
| 52 |
@Override |
| 53 |
protected Collection<Method> suppressForTreeMapNatural() { |
| 54 |
return Arrays.asList( |
| 55 |
getPutNullKeyUnsupportedMethod(), |
| 56 |
getPutAllNullKeyUnsupportedMethod(), |
| 57 |
getCreateWithNullKeyUnsupportedMethod(), |
| 58 |
getCreateWithNullUnsupportedMethod(), |
| 59 |
getContainsEntryWithIncomparableKeyMethod(), |
| 60 |
getContainsEntryWithIncomparableValueMethod()); |
| 61 |
} |
| 62 |
|
| 63 |
@Override |
| 64 |
protected Collection<Method> suppressForConcurrentHashMap() { |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
return Arrays.asList( |
| 77 |
getAddUnsupportedNotPresentMethod(), |
| 78 |
getAddAllUnsupportedNonePresentMethod(), |
| 79 |
getAddAllUnsupportedSomePresentMethod()); |
| 80 |
} |
| 81 |
|
| 82 |
@Override |
| 83 |
protected Collection<Method> suppressForConcurrentSkipListMap() { |
| 84 |
List<Method> methods = newArrayList(); |
| 85 |
methods.addAll(super.suppressForConcurrentSkipListMap()); |
| 86 |
methods.add(getContainsEntryWithIncomparableKeyMethod()); |
| 87 |
methods.add(getContainsEntryWithIncomparableValueMethod()); |
| 88 |
return methods; |
| 89 |
} |
| 90 |
} |