blob: 44ef66d1ed89c10b99fd7a9d2062d61bdfc001f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* 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/
*/
package jsr166;
import java.util.Collection;
import junit.framework.Test;
/**
* Contains tests applicable to all Collection implementations.
*/
public class CollectionTest extends JSR166TestCase {
final CollectionImplementation impl;
/** Tests are parameterized by a Collection implementation. */
CollectionTest(CollectionImplementation impl, String methodName) {
super(methodName);
this.impl = impl;
}
public static Test testSuite(CollectionImplementation impl) {
return newTestSuite
(parameterizedTestSuite(CollectionTest.class,
CollectionImplementation.class,
impl),
jdk8ParameterizedTestSuite(CollectionTest.class,
CollectionImplementation.class,
impl));
}
/** A test of the CollectionImplementation implementation ! */
public void testEmptyMeansEmpty() {
assertTrue(impl.emptyCollection().isEmpty());
assertEquals(0, impl.emptyCollection().size());
}
// public void testCollectionDebugFail() { fail(); }
}
|