27 |
|
public static Test suite() { |
28 |
|
class Implementation implements CollectionImplementation { |
29 |
|
public Class<?> klazz() { return ArrayDeque.class; } |
30 |
< |
public Collection emptyCollection() { return new ArrayDeque(); } |
30 |
> |
public Collection emptyCollection() { return populatedDeque(0); } |
31 |
|
public Object makeElement(int i) { return i; } |
32 |
|
public boolean isConcurrent() { return false; } |
33 |
|
public boolean permitsNulls() { return false; } |
40 |
|
* Returns a new deque of given size containing consecutive |
41 |
|
* Integers 0 ... n - 1. |
42 |
|
*/ |
43 |
< |
private ArrayDeque<Integer> populatedDeque(int n) { |
43 |
> |
private static ArrayDeque<Integer> populatedDeque(int n) { |
44 |
|
// Randomize various aspects of memory layout, including |
45 |
|
// filled-to-capacity and wraparound. |
46 |
|
final ArrayDeque<Integer> q; |