[cvs] / jsr166 / src / test / tck / ArrayListTest.java Repository:
ViewVC logotype

View of /jsr166/src/test/tck/ArrayListTest.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (download) (annotate)
Sat Mar 11 17:33:32 2017 UTC (6 months, 1 week ago) by jsr166
Branch: MAIN
Changes since 1.4: +0 -2 lines
fix unused imports reported by errorprone [RemoveUnusedImports]
/*
 * Written by Doug Lea and Martin Buchholz with assistance from
 * members of JCP JSR-166 Expert Group and released to the public
 * domain, as explained at
 * http://creativecommons.org/publicdomain/zero/1.0/
 */

import java.util.ArrayList;
import java.util.List;

import junit.framework.Test;

public class ArrayListTest extends JSR166TestCase {
    public static void main(String[] args) {
        main(suite(), args);
    }

    public static Test suite() {
        class Implementation implements CollectionImplementation {
            public Class<?> klazz() { return ArrayList.class; }
            public List emptyCollection() { return new ArrayList(); }
            public Object makeElement(int i) { return i; }
            public boolean isConcurrent() { return false; }
            public boolean permitsNulls() { return true; }
        }
        class SubListImplementation extends Implementation {
            public List emptyCollection() {
                return super.emptyCollection().subList(0, 0);
            }
        }
        return newTestSuite(
                // ArrayListTest.class,
                CollectionTest.testSuite(new Implementation()),
                CollectionTest.testSuite(new SubListImplementation()));
    }

}

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8