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 junit.framework.Test; |
9 |
|
|
|
10 |
|
|
/** |
11 |
|
|
* Contains tests applicable to all Collection implementations. |
12 |
|
|
*/ |
13 |
|
|
public class CollectionTest extends JSR166TestCase { |
14 |
|
|
final CollectionImplementation impl; |
15 |
|
|
|
16 |
|
|
/** Tests are parameterized by a Collection implementation. */ |
17 |
|
|
CollectionTest(CollectionImplementation impl, String methodName) { |
18 |
|
|
super(methodName); |
19 |
|
|
this.impl = impl; |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
public static Test testSuite(CollectionImplementation impl) { |
23 |
|
|
return newTestSuite |
24 |
|
|
(parameterizedTestSuite(CollectionTest.class, |
25 |
|
|
CollectionImplementation.class, |
26 |
|
|
impl), |
27 |
|
|
jdk8ParameterizedTestSuite(CollectionTest.class, |
28 |
|
|
CollectionImplementation.class, |
29 |
|
|
impl)); |
30 |
|
|
} |
31 |
|
|
|
32 |
jsr166 |
1.4 |
// public void testCollectionDebugFail() { |
33 |
|
|
// fail(impl.klazz().getSimpleName()); |
34 |
|
|
// } |
35 |
jsr166 |
1.1 |
} |