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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download)

1 : jsr166 1.1 /*
2 :     * Written by Doug Lea and Martin Buchholz with assistance from
3 :     * members of JCP JSR-166 Expert Group and released to the public
4 :     * domain, as explained at
5 :     * http://creativecommons.org/publicdomain/zero/1.0/
6 :     */
7 :    
8 :     import java.util.ArrayList;
9 :     import java.util.Collection;
10 : jsr166 1.2 import java.util.List;
11 : jsr166 1.1
12 :     import junit.framework.Test;
13 :     import junit.framework.TestSuite;
14 :    
15 :     public class ArrayListTest extends JSR166TestCase {
16 :     public static void main(String[] args) {
17 :     main(suite(), args);
18 :     }
19 :    
20 :     public static Test suite() {
21 :     class Implementation implements CollectionImplementation {
22 :     public Class<?> klazz() { return ArrayList.class; }
23 : jsr166 1.2 public List emptyCollection() { return new ArrayList(); }
24 : jsr166 1.1 public Object makeElement(int i) { return i; }
25 :     public boolean isConcurrent() { return false; }
26 :     public boolean permitsNulls() { return true; }
27 :     }
28 : jsr166 1.2 class SubListImplementation extends Implementation {
29 :     public List emptyCollection() {
30 :     return super.emptyCollection().subList(0, 0);
31 :     }
32 :     }
33 :     return newTestSuite(
34 :     // ArrayListTest.class,
35 :     CollectionTest.testSuite(new Implementation()),
36 :     CollectionTest.testSuite(new SubListImplementation()));
37 : jsr166 1.1 }
38 :    
39 :     }

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8