37 |
|
* Returns a new queue of given size containing consecutive |
38 |
|
* Integers 0 ... n - 1. |
39 |
|
*/ |
40 |
< |
private ConcurrentLinkedQueue<Integer> populatedQueue(int n) { |
40 |
> |
private static ConcurrentLinkedQueue<Integer> populatedQueue(int n) { |
41 |
|
ConcurrentLinkedQueue<Integer> q = new ConcurrentLinkedQueue<>(); |
42 |
|
assertTrue(q.isEmpty()); |
43 |
|
for (int i = 0; i < n; ++i) |
172 |
|
} |
173 |
|
|
174 |
|
/** |
175 |
< |
* addAll(null) throws NPE |
175 |
> |
* addAll(null) throws NullPointerException |
176 |
|
*/ |
177 |
|
public void testAddAll1() { |
178 |
|
ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(); |
183 |
|
} |
184 |
|
|
185 |
|
/** |
186 |
< |
* addAll(this) throws IAE |
186 |
> |
* addAll(this) throws IllegalArgumentException |
187 |
|
*/ |
188 |
|
public void testAddAllSelf() { |
189 |
|
ConcurrentLinkedQueue q = populatedQueue(SIZE); |
194 |
|
} |
195 |
|
|
196 |
|
/** |
197 |
< |
* addAll of a collection with null elements throws NPE |
197 |
> |
* addAll of a collection with null elements throws NullPointerException |
198 |
|
*/ |
199 |
|
public void testAddAll2() { |
200 |
|
ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(); |
511 |
|
} |
512 |
|
|
513 |
|
/** |
514 |
< |
* A deserialized serialized queue has same elements in same order |
514 |
> |
* A deserialized/reserialized queue has same elements in same order |
515 |
|
*/ |
516 |
|
public void testSerialization() throws Exception { |
517 |
|
Queue x = populatedQueue(SIZE); |