use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class LinkedHashMultimapTest method suite.
// suite
@GwtIncompatible
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(SetMultimapTestSuiteBuilder.using(new TestStringSetMultimapGenerator() {
@Override
protected SetMultimap<String, String> create(Entry<String, String>[] entries) {
SetMultimap<String, String> multimap = LinkedHashMultimap.create();
for (Entry<String, String> entry : entries) {
multimap.put(entry.getKey(), entry.getValue());
}
return multimap;
}
}).named("LinkedHashMultimap").withFeatures(MapFeature.ALLOWS_NULL_KEYS, MapFeature.ALLOWS_NULL_VALUES, MapFeature.ALLOWS_ANY_NULL_QUERIES, MapFeature.GENERAL_PURPOSE, MapFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION, CollectionFeature.SUPPORTS_ITERATOR_REMOVE, CollectionFeature.KNOWN_ORDER, CollectionFeature.SERIALIZABLE, CollectionSize.ANY).createTestSuite());
suite.addTestSuite(LinkedHashMultimapTest.class);
return suite;
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class LinkedListMultimapTest method suite.
// suite
@GwtIncompatible
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(ListMultimapTestSuiteBuilder.using(new TestStringListMultimapGenerator() {
@Override
protected ListMultimap<String, String> create(Entry<String, String>[] entries) {
ListMultimap<String, String> multimap = LinkedListMultimap.create();
for (Entry<String, String> entry : entries) {
multimap.put(entry.getKey(), entry.getValue());
}
return multimap;
}
}).named("LinkedListMultimap").withFeatures(MapFeature.ALLOWS_NULL_KEYS, MapFeature.ALLOWS_NULL_VALUES, MapFeature.ALLOWS_ANY_NULL_QUERIES, MapFeature.GENERAL_PURPOSE, CollectionFeature.SUPPORTS_ITERATOR_REMOVE, CollectionFeature.SERIALIZABLE, CollectionFeature.KNOWN_ORDER, CollectionSize.ANY).createTestSuite());
suite.addTestSuite(LinkedListMultimapTest.class);
return suite;
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class ListsTest method testNullPointerExceptions.
// NullPointerTester
@GwtIncompatible
public void testNullPointerExceptions() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(Lists.class);
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class MultimapBuilderTest method reserialize.
// serialization
@GwtIncompatible
private static Object reserialize(Object object) throws Exception {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
new ObjectOutputStream(bytes).writeObject(object);
return new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray())).readObject();
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class TreeMultimapNaturalTest method testTreeMultimapDerived.
// SerializableTester
@GwtIncompatible
public void testTreeMultimapDerived() {
TreeMultimap<DerivedComparable, DerivedComparable> multimap = TreeMultimap.create();
assertEquals(ImmutableMultimap.of(), multimap);
multimap.put(new DerivedComparable("foo"), new DerivedComparable("f"));
multimap.put(new DerivedComparable("foo"), new DerivedComparable("o"));
multimap.put(new DerivedComparable("foo"), new DerivedComparable("o"));
multimap.put(new DerivedComparable("bar"), new DerivedComparable("b"));
multimap.put(new DerivedComparable("bar"), new DerivedComparable("a"));
multimap.put(new DerivedComparable("bar"), new DerivedComparable("r"));
assertThat(multimap.keySet()).containsExactly(new DerivedComparable("bar"), new DerivedComparable("foo")).inOrder();
assertThat(multimap.values()).containsExactly(new DerivedComparable("a"), new DerivedComparable("b"), new DerivedComparable("r"), new DerivedComparable("f"), new DerivedComparable("o")).inOrder();
assertEquals(Ordering.natural(), multimap.keyComparator());
assertEquals(Ordering.natural(), multimap.valueComparator());
SerializableTester.reserializeAndAssert(multimap);
}
Aggregations