Search in sources :

Example 1 with ListTestSuiteBuilder

use of com.google.common.collect.testing.ListTestSuiteBuilder in project guava by google.

the class DoubleArrayAsListTest method suite.

// suite
@GwtIncompatible
public static Test suite() {
    List<ListTestSuiteBuilder<Double>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new DoublesAsListGenerator()).named("Doubles.asList"), ListTestSuiteBuilder.using(new DoublsAsListHeadSubListGenerator()).named("Doubles.asList, head subList"), ListTestSuiteBuilder.using(new DoublesAsListTailSubListGenerator()).named("Doubles.asList, tail subList"), ListTestSuiteBuilder.using(new DoublesAsListMiddleSubListGenerator()).named("Doubles.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Double> builder : builders) {
        suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
    }
    return suite;
}
Also used : ListTestSuiteBuilder(com.google.common.collect.testing.ListTestSuiteBuilder) TestSuite(junit.framework.TestSuite) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 2 with ListTestSuiteBuilder

use of com.google.common.collect.testing.ListTestSuiteBuilder in project guava by google.

the class IntArrayAsListTest method suite.

// suite
@GwtIncompatible
public static Test suite() {
    List<ListTestSuiteBuilder<Integer>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new IntsAsListGenerator()).named("Ints.asList"), ListTestSuiteBuilder.using(new IntsAsListHeadSubListGenerator()).named("Ints.asList, head subList"), ListTestSuiteBuilder.using(new IntsAsListTailSubListGenerator()).named("Ints.asList, tail subList"), ListTestSuiteBuilder.using(new IntsAsListMiddleSubListGenerator()).named("Ints.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Integer> builder : builders) {
        suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
    }
    return suite;
}
Also used : ListTestSuiteBuilder(com.google.common.collect.testing.ListTestSuiteBuilder) TestSuite(junit.framework.TestSuite) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 3 with ListTestSuiteBuilder

use of com.google.common.collect.testing.ListTestSuiteBuilder in project guava by hceylan.

the class ByteArrayAsListTest method suite.

public static Test suite() {
    List<ListTestSuiteBuilder<Byte>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new BytesAsListGenerator()).named("Bytes.asList"), ListTestSuiteBuilder.using(new BytesAsListHeadSubListGenerator()).named("Bytes.asList, head subList"), ListTestSuiteBuilder.using(new BytesAsListTailSubListGenerator()).named("Bytes.asList, tail subList"), ListTestSuiteBuilder.using(new BytesAsListMiddleSubListGenerator()).named("Bytes.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Byte> builder : builders) {
        suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
    }
    return suite;
}
Also used : ListTestSuiteBuilder(com.google.common.collect.testing.ListTestSuiteBuilder) TestSuite(junit.framework.TestSuite)

Example 4 with ListTestSuiteBuilder

use of com.google.common.collect.testing.ListTestSuiteBuilder in project guava by hceylan.

the class DoubleArrayAsListTest method suite.

public static Test suite() {
    List<ListTestSuiteBuilder<Double>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new DoublesAsListGenerator()).named("Doubles.asList"), ListTestSuiteBuilder.using(new DoublsAsListHeadSubListGenerator()).named("Doubles.asList, head subList"), ListTestSuiteBuilder.using(new DoublesAsListTailSubListGenerator()).named("Doubles.asList, tail subList"), ListTestSuiteBuilder.using(new DoublesAsListMiddleSubListGenerator()).named("Doubles.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Double> builder : builders) {
        suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
    }
    return suite;
}
Also used : ListTestSuiteBuilder(com.google.common.collect.testing.ListTestSuiteBuilder) TestSuite(junit.framework.TestSuite)

Example 5 with ListTestSuiteBuilder

use of com.google.common.collect.testing.ListTestSuiteBuilder in project guava by hceylan.

the class IntArrayAsListTest method suite.

public static Test suite() {
    List<ListTestSuiteBuilder<Integer>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new IntsAsListGenerator()).named("Ints.asList"), ListTestSuiteBuilder.using(new IntsAsListHeadSubListGenerator()).named("Ints.asList, head subList"), ListTestSuiteBuilder.using(new IntsAsListTailSubListGenerator()).named("Ints.asList, tail subList"), ListTestSuiteBuilder.using(new IntsAsListMiddleSubListGenerator()).named("Ints.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Integer> builder : builders) {
        suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
    }
    return suite;
}
Also used : ListTestSuiteBuilder(com.google.common.collect.testing.ListTestSuiteBuilder) TestSuite(junit.framework.TestSuite)

Aggregations

ListTestSuiteBuilder (com.google.common.collect.testing.ListTestSuiteBuilder)17 TestSuite (junit.framework.TestSuite)17 GwtIncompatible (com.google.common.annotations.GwtIncompatible)10 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1