use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class FluentIterableTest method testNullPointerExceptions.
// NullPointerTester
@GwtIncompatible
public void testNullPointerExceptions() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(FluentIterable.class);
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class EnumHashBiMapTest method suite.
// suite
@GwtIncompatible
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(BiMapTestSuiteBuilder.using(new EnumHashBiMapGenerator()).named("EnumHashBiMap").withFeatures(CollectionSize.ANY, CollectionFeature.SERIALIZABLE, CollectionFeature.SUPPORTS_ITERATOR_REMOVE, MapFeature.ALLOWS_NULL_VALUES, MapFeature.GENERAL_PURPOSE, CollectionFeature.KNOWN_ORDER).createTestSuite());
suite.addTestSuite(EnumHashBiMapTest.class);
return suite;
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class ListsImplTest method suite.
// suite
@GwtIncompatible
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(createExampleSuite(new ArrayListExample("ArrayList")));
suite.addTest(createExampleSuite(new LinkedListExample("LinkedList")));
suite.addTest(createExampleSuite(new ArraysAsListExample("Arrays.asList")));
suite.addTest(createExampleSuite(new ImmutableListExample("ImmutableList")));
suite.addTest(createExampleSuite(new CopyOnWriteListExample("CopyOnWriteArrayList")));
suite.addTestSuite(ListsImplTest.class);
return suite;
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class ImmutableMultisetTest method suite.
// suite // TODO(cpovirk): add to collect/gwt/suites
@GwtIncompatible
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(ImmutableMultisetTest.class);
suite.addTestSuite(FloodingTest.class);
suite.addTest(MultisetTestSuiteBuilder.using(new TestStringMultisetGenerator() {
@Override
protected Multiset<String> create(String[] elements) {
return ImmutableMultiset.copyOf(elements);
}
}).named("ImmutableMultiset").withFeatures(CollectionSize.ANY, CollectionFeature.SERIALIZABLE_INCLUDING_VIEWS, CollectionFeature.ALLOWS_NULL_QUERIES).createTestSuite());
suite.addTest(MultisetTestSuiteBuilder.using(new TestStringMultisetGenerator() {
@Override
protected Multiset<String> create(String[] elements) {
return ImmutableMultiset.<String>builder().add(elements).buildJdkBacked();
}
}).named("ImmutableMultiset [JDK backed]").withFeatures(CollectionSize.ANY, CollectionFeature.SERIALIZABLE_INCLUDING_VIEWS, CollectionFeature.ALLOWS_NULL_QUERIES).createTestSuite());
suite.addTest(SetTestSuiteBuilder.using(new TestStringSetGenerator() {
@Override
protected Set<String> create(String[] elements) {
return ImmutableMultiset.copyOf(elements).elementSet();
}
}).named("ImmutableMultiset, element set").withFeatures(CollectionSize.ANY, CollectionFeature.SERIALIZABLE, CollectionFeature.ALLOWS_NULL_QUERIES).createTestSuite());
suite.addTest(ListTestSuiteBuilder.using(new TestStringListGenerator() {
@Override
protected List<String> create(String[] elements) {
return ImmutableMultiset.copyOf(elements).asList();
}
@Override
public List<String> order(List<String> insertionOrder) {
List<String> order = new ArrayList<>();
for (String s : insertionOrder) {
int index = order.indexOf(s);
if (index == -1) {
order.add(s);
} else {
order.add(index, s);
}
}
return order;
}
}).named("ImmutableMultiset.asList").withFeatures(CollectionSize.ANY, CollectionFeature.SERIALIZABLE, CollectionFeature.ALLOWS_NULL_QUERIES).createTestSuite());
suite.addTest(ListTestSuiteBuilder.using(new TestStringListGenerator() {
@Override
protected List<String> create(String[] elements) {
Set<String> set = new HashSet<>();
ImmutableMultiset.Builder<String> builder = ImmutableMultiset.builder();
for (String s : elements) {
checkArgument(set.add(s));
builder.addCopies(s, 2);
}
ImmutableSet<String> elementSet = (ImmutableSet<String>) builder.build().elementSet();
return elementSet.asList();
}
}).named("ImmutableMultiset.elementSet.asList").withFeatures(CollectionSize.ANY, CollectionFeature.REJECTS_DUPLICATES_AT_CREATION, CollectionFeature.SERIALIZABLE, CollectionFeature.ALLOWS_NULL_QUERIES).createTestSuite());
return suite;
}
use of com.google.common.annotations.GwtIncompatible in project guava by google.
the class ImmutableSetMultimapTest method suite.
// suite
@GwtIncompatible
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(ImmutableSetMultimapTest.class);
suite.addTest(SetMultimapTestSuiteBuilder.using(new ImmutableSetMultimapGenerator()).named("ImmutableSetMultimap").withFeatures(ALLOWS_ANY_NULL_QUERIES, KNOWN_ORDER, SERIALIZABLE, CollectionSize.ANY).createTestSuite());
suite.addTest(SetMultimapTestSuiteBuilder.using(new ImmutableSetMultimapCopyOfEntriesGenerator()).named("ImmutableSetMultimap.copyOf[Iterable<Entry>]").withFeatures(ALLOWS_ANY_NULL_QUERIES, KNOWN_ORDER, SERIALIZABLE, CollectionSize.ANY).createTestSuite());
return suite;
}
Aggregations