28 |
|
public boolean isConcurrent() { return false; } |
29 |
|
public boolean permitsNulls() { return true; } |
30 |
|
} |
31 |
< |
return newTestSuite(LinkedListTest.class, |
32 |
< |
CollectionTest.testSuite(new Implementation())); |
31 |
> |
class SubListImplementation extends Implementation { |
32 |
> |
public Collection emptyCollection() { |
33 |
> |
return new LinkedList().subList(0, 0); |
34 |
> |
} |
35 |
> |
} |
36 |
> |
return newTestSuite( |
37 |
> |
LinkedListTest.class, |
38 |
> |
CollectionTest.testSuite(new Implementation()), |
39 |
> |
CollectionTest.testSuite(new SubListImplementation())); |
40 |
|
} |
41 |
|
|
42 |
|
/** |
44 |
|
* Integers 0 ... n - 1. |
45 |
|
*/ |
46 |
|
private LinkedList<Integer> populatedQueue(int n) { |
47 |
< |
LinkedList<Integer> q = new LinkedList<Integer>(); |
47 |
> |
LinkedList<Integer> q = new LinkedList<>(); |
48 |
|
assertTrue(q.isEmpty()); |
49 |
|
for (int i = 0; i < n; ++i) |
50 |
|
assertTrue(q.offer(new Integer(i))); |