12 |
|
|
13 |
|
public class LinkedListTest extends JSR166TestCase { |
14 |
|
public static void main(String[] args) { |
15 |
< |
junit.textui.TestRunner.run (suite()); |
15 |
> |
junit.textui.TestRunner.run(suite()); |
16 |
|
} |
17 |
|
|
18 |
|
public static Test suite() { |
19 |
< |
return new TestSuite(LinkedListTest.class); |
19 |
> |
return new TestSuite(LinkedListTest.class); |
20 |
|
} |
21 |
|
|
22 |
|
/** |
26 |
|
private LinkedList populatedQueue(int n) { |
27 |
|
LinkedList q = new LinkedList(); |
28 |
|
assertTrue(q.isEmpty()); |
29 |
< |
for(int i = 0; i < n; ++i) |
30 |
< |
assertTrue(q.offer(new Integer(i))); |
29 |
> |
for (int i = 0; i < n; ++i) |
30 |
> |
assertTrue(q.offer(new Integer(i))); |
31 |
|
assertFalse(q.isEmpty()); |
32 |
< |
assertEquals(n, q.size()); |
32 |
> |
assertEquals(n, q.size()); |
33 |
|
return q; |
34 |
|
} |
35 |
|
|
47 |
|
try { |
48 |
|
LinkedList q = new LinkedList((Collection)null); |
49 |
|
shouldThrow(); |
50 |
< |
} |
51 |
< |
catch (NullPointerException success) {} |
50 |
> |
} catch (NullPointerException success) {} |
51 |
|
} |
52 |
|
|
53 |
|
/** |
54 |
|
* Queue contains all elements of collection used to initialize |
56 |
– |
|
55 |
|
*/ |
56 |
|
public void testConstructor6() { |
57 |
< |
try { |
58 |
< |
Integer[] ints = new Integer[SIZE]; |
59 |
< |
for (int i = 0; i < SIZE; ++i) |
60 |
< |
ints[i] = new Integer(i); |
61 |
< |
LinkedList q = new LinkedList(Arrays.asList(ints)); |
62 |
< |
for (int i = 0; i < SIZE; ++i) |
65 |
< |
assertEquals(ints[i], q.poll()); |
66 |
< |
} |
67 |
< |
finally {} |
57 |
> |
Integer[] ints = new Integer[SIZE]; |
58 |
> |
for (int i = 0; i < SIZE; ++i) |
59 |
> |
ints[i] = i; |
60 |
> |
LinkedList q = new LinkedList(Arrays.asList(ints)); |
61 |
> |
for (int i = 0; i < SIZE; ++i) |
62 |
> |
assertEquals(ints[i], q.poll()); |
63 |
|
} |
64 |
|
|
65 |
|
/** |
95 |
|
* offer(null) succeeds |
96 |
|
*/ |
97 |
|
public void testOfferNull() { |
98 |
< |
try { |
99 |
< |
LinkedList q = new LinkedList(); |
105 |
< |
q.offer(null); |
106 |
< |
} catch (NullPointerException ie) { |
107 |
< |
unexpectedException(); |
108 |
< |
} |
98 |
> |
LinkedList q = new LinkedList(); |
99 |
> |
q.offer(null); |
100 |
|
} |
101 |
|
|
102 |
|
/** |
127 |
|
LinkedList q = new LinkedList(); |
128 |
|
q.addAll(null); |
129 |
|
shouldThrow(); |
130 |
< |
} |
140 |
< |
catch (NullPointerException success) {} |
130 |
> |
} catch (NullPointerException success) {} |
131 |
|
} |
132 |
|
|
133 |
|
/** |
134 |
|
* Queue contains all elements, in traversal order, of successful addAll |
135 |
|
*/ |
136 |
|
public void testAddAll5() { |
137 |
< |
try { |
138 |
< |
Integer[] empty = new Integer[0]; |
139 |
< |
Integer[] ints = new Integer[SIZE]; |
140 |
< |
for (int i = 0; i < SIZE; ++i) |
141 |
< |
ints[i] = new Integer(i); |
142 |
< |
LinkedList q = new LinkedList(); |
143 |
< |
assertFalse(q.addAll(Arrays.asList(empty))); |
144 |
< |
assertTrue(q.addAll(Arrays.asList(ints))); |
145 |
< |
for (int i = 0; i < SIZE; ++i) |
156 |
< |
assertEquals(ints[i], q.poll()); |
157 |
< |
} |
158 |
< |
finally {} |
137 |
> |
Integer[] empty = new Integer[0]; |
138 |
> |
Integer[] ints = new Integer[SIZE]; |
139 |
> |
for (int i = 0; i < SIZE; ++i) |
140 |
> |
ints[i] = i; |
141 |
> |
LinkedList q = new LinkedList(); |
142 |
> |
assertFalse(q.addAll(Arrays.asList(empty))); |
143 |
> |
assertTrue(q.addAll(Arrays.asList(ints))); |
144 |
> |
for (int i = 0; i < SIZE; ++i) |
145 |
> |
assertEquals(ints[i], q.poll()); |
146 |
|
} |
147 |
|
|
148 |
|
/** |
149 |
|
* addAll with too large an index throws IOOBE |
150 |
|
*/ |
151 |
|
public void testAddAll2_IndexOutOfBoundsException() { |
152 |
< |
try { |
153 |
< |
LinkedList l = new LinkedList(); |
154 |
< |
l.add(new Object()); |
155 |
< |
LinkedList m = new LinkedList(); |
156 |
< |
m.add(new Object()); |
157 |
< |
l.addAll(4,m); |
158 |
< |
shouldThrow(); |
159 |
< |
} catch(IndexOutOfBoundsException success) {} |
152 |
> |
LinkedList l = new LinkedList(); |
153 |
> |
l.add(new Object()); |
154 |
> |
LinkedList m = new LinkedList(); |
155 |
> |
m.add(new Object()); |
156 |
> |
try { |
157 |
> |
l.addAll(4,m); |
158 |
> |
shouldThrow(); |
159 |
> |
} catch (IndexOutOfBoundsException success) {} |
160 |
|
} |
161 |
|
|
162 |
|
/** |
163 |
|
* addAll with negative index throws IOOBE |
164 |
|
*/ |
165 |
|
public void testAddAll4_BadIndex() { |
166 |
< |
try { |
167 |
< |
LinkedList l = new LinkedList(); |
168 |
< |
l.add(new Object()); |
169 |
< |
LinkedList m = new LinkedList(); |
170 |
< |
m.add(new Object()); |
171 |
< |
l.addAll(-1,m); |
172 |
< |
shouldThrow(); |
173 |
< |
} catch(IndexOutOfBoundsException success){} |
166 |
> |
LinkedList l = new LinkedList(); |
167 |
> |
l.add(new Object()); |
168 |
> |
LinkedList m = new LinkedList(); |
169 |
> |
m.add(new Object()); |
170 |
> |
try { |
171 |
> |
l.addAll(-1,m); |
172 |
> |
shouldThrow(); |
173 |
> |
} catch (IndexOutOfBoundsException success) {} |
174 |
|
} |
175 |
|
|
176 |
|
/** |
177 |
< |
* poll succeeds unless empty |
177 |
> |
* poll succeeds unless empty |
178 |
|
*/ |
179 |
|
public void testPoll() { |
180 |
|
LinkedList q = populatedQueue(SIZE); |
181 |
|
for (int i = 0; i < SIZE; ++i) { |
182 |
< |
assertEquals(i, ((Integer)q.poll()).intValue()); |
182 |
> |
assertEquals(i, q.poll()); |
183 |
|
} |
184 |
< |
assertNull(q.poll()); |
184 |
> |
assertNull(q.poll()); |
185 |
|
} |
186 |
|
|
187 |
|
/** |
188 |
< |
* peek returns next element, or null if empty |
188 |
> |
* peek returns next element, or null if empty |
189 |
|
*/ |
190 |
|
public void testPeek() { |
191 |
|
LinkedList q = populatedQueue(SIZE); |
192 |
|
for (int i = 0; i < SIZE; ++i) { |
193 |
< |
assertEquals(i, ((Integer)q.peek()).intValue()); |
194 |
< |
q.poll(); |
193 |
> |
assertEquals(i, q.peek()); |
194 |
> |
assertEquals(i, q.poll()); |
195 |
|
assertTrue(q.peek() == null || |
196 |
< |
i != ((Integer)q.peek()).intValue()); |
196 |
> |
!q.peek().equals(i)); |
197 |
|
} |
198 |
< |
assertNull(q.peek()); |
198 |
> |
assertNull(q.peek()); |
199 |
|
} |
200 |
|
|
201 |
|
/** |
204 |
|
public void testElement() { |
205 |
|
LinkedList q = populatedQueue(SIZE); |
206 |
|
for (int i = 0; i < SIZE; ++i) { |
207 |
< |
assertEquals(i, ((Integer)q.element()).intValue()); |
208 |
< |
q.poll(); |
207 |
> |
assertEquals(i, q.element()); |
208 |
> |
assertEquals(i, q.poll()); |
209 |
|
} |
210 |
|
try { |
211 |
|
q.element(); |
212 |
|
shouldThrow(); |
213 |
< |
} |
227 |
< |
catch (NoSuchElementException success) {} |
213 |
> |
} catch (NoSuchElementException success) {} |
214 |
|
} |
215 |
|
|
216 |
|
/** |
217 |
< |
* remove removes next element, or throws NSEE if empty |
217 |
> |
* remove removes next element, or throws NSEE if empty |
218 |
|
*/ |
219 |
|
public void testRemove() { |
220 |
|
LinkedList q = populatedQueue(SIZE); |
221 |
|
for (int i = 0; i < SIZE; ++i) { |
222 |
< |
assertEquals(i, ((Integer)q.remove()).intValue()); |
222 |
> |
assertEquals(i, q.remove()); |
223 |
|
} |
224 |
|
try { |
225 |
|
q.remove(); |
226 |
|
shouldThrow(); |
227 |
< |
} catch (NoSuchElementException success){ |
242 |
< |
} |
227 |
> |
} catch (NoSuchElementException success) {} |
228 |
|
} |
229 |
|
|
230 |
|
/** |
262 |
|
q.clear(); |
263 |
|
assertTrue(q.isEmpty()); |
264 |
|
assertEquals(0, q.size()); |
265 |
< |
q.add(new Integer(1)); |
265 |
> |
assertTrue(q.add(new Integer(1))); |
266 |
|
assertFalse(q.isEmpty()); |
267 |
|
q.clear(); |
268 |
|
assertTrue(q.isEmpty()); |
277 |
|
for (int i = 0; i < SIZE; ++i) { |
278 |
|
assertTrue(q.containsAll(p)); |
279 |
|
assertFalse(p.containsAll(q)); |
280 |
< |
p.add(new Integer(i)); |
280 |
> |
assertTrue(p.add(new Integer(i))); |
281 |
|
} |
282 |
|
assertTrue(p.containsAll(q)); |
283 |
|
} |
318 |
|
} |
319 |
|
|
320 |
|
/** |
321 |
< |
* toArray contains all elements |
321 |
> |
* toArray contains all elements |
322 |
|
*/ |
323 |
|
public void testToArray() { |
324 |
|
LinkedList q = populatedQueue(SIZE); |
325 |
< |
Object[] o = q.toArray(); |
325 |
> |
Object[] o = q.toArray(); |
326 |
|
Arrays.sort(o); |
327 |
< |
for(int i = 0; i < o.length; i++) |
328 |
< |
assertEquals(o[i], q.poll()); |
327 |
> |
for (int i = 0; i < o.length; i++) |
328 |
> |
assertEquals(o[i], q.poll()); |
329 |
|
} |
330 |
|
|
331 |
|
/** |
332 |
< |
* toArray(a) contains all elements |
332 |
> |
* toArray(a) contains all elements |
333 |
|
*/ |
334 |
|
public void testToArray2() { |
335 |
|
LinkedList q = populatedQueue(SIZE); |
336 |
< |
Integer[] ints = new Integer[SIZE]; |
337 |
< |
ints = (Integer[])q.toArray(ints); |
336 |
> |
Integer[] ints = new Integer[SIZE]; |
337 |
> |
ints = (Integer[])q.toArray(ints); |
338 |
|
Arrays.sort(ints); |
339 |
< |
for(int i = 0; i < ints.length; i++) |
339 |
> |
for (int i = 0; i < ints.length; i++) |
340 |
|
assertEquals(ints[i], q.poll()); |
341 |
|
} |
342 |
|
|
344 |
|
* toArray(null) throws NPE |
345 |
|
*/ |
346 |
|
public void testToArray_BadArg() { |
347 |
< |
try { |
348 |
< |
LinkedList l = new LinkedList(); |
349 |
< |
l.add(new Object()); |
350 |
< |
Object o[] = l.toArray(null); |
351 |
< |
shouldThrow(); |
352 |
< |
} catch(NullPointerException success){} |
347 |
> |
LinkedList l = new LinkedList(); |
348 |
> |
l.add(new Object()); |
349 |
> |
try { |
350 |
> |
Object o[] = l.toArray(null); |
351 |
> |
shouldThrow(); |
352 |
> |
} catch (NullPointerException success) {} |
353 |
|
} |
354 |
|
|
355 |
|
/** |
356 |
< |
* toArray with incompatable aray type throws CCE |
356 |
> |
* toArray(incompatible array type) throws ArrayStoreException |
357 |
|
*/ |
358 |
|
public void testToArray1_BadArg() { |
359 |
< |
try { |
360 |
< |
LinkedList l = new LinkedList(); |
361 |
< |
l.add(new Integer(5)); |
362 |
< |
Object o[] = l.toArray(new String[10] ); |
363 |
< |
shouldThrow(); |
364 |
< |
} catch(ArrayStoreException success){} |
359 |
> |
LinkedList l = new LinkedList(); |
360 |
> |
l.add(new Integer(5)); |
361 |
> |
try { |
362 |
> |
l.toArray(new String[10]); |
363 |
> |
shouldThrow(); |
364 |
> |
} catch (ArrayStoreException success) {} |
365 |
|
} |
366 |
|
|
367 |
|
/** |
368 |
< |
* iterator iterates through all elements |
368 |
> |
* iterator iterates through all elements |
369 |
|
*/ |
370 |
|
public void testIterator() { |
371 |
|
LinkedList q = populatedQueue(SIZE); |
372 |
|
int i = 0; |
373 |
< |
Iterator it = q.iterator(); |
374 |
< |
while(it.hasNext()) { |
373 |
> |
Iterator it = q.iterator(); |
374 |
> |
while (it.hasNext()) { |
375 |
|
assertTrue(q.contains(it.next())); |
376 |
|
++i; |
377 |
|
} |
379 |
|
} |
380 |
|
|
381 |
|
/** |
382 |
< |
* iterator ordering is FIFO |
382 |
> |
* iterator ordering is FIFO |
383 |
|
*/ |
384 |
|
public void testIteratorOrdering() { |
385 |
|
final LinkedList q = new LinkedList(); |
388 |
|
q.add(new Integer(3)); |
389 |
|
int k = 0; |
390 |
|
for (Iterator it = q.iterator(); it.hasNext();) { |
391 |
< |
int i = ((Integer)(it.next())).intValue(); |
407 |
< |
assertEquals(++k, i); |
391 |
> |
assertEquals(++k, it.next()); |
392 |
|
} |
393 |
|
|
394 |
|
assertEquals(3, k); |
397 |
|
/** |
398 |
|
* iterator.remove removes current element |
399 |
|
*/ |
400 |
< |
public void testIteratorRemove () { |
400 |
> |
public void testIteratorRemove() { |
401 |
|
final LinkedList q = new LinkedList(); |
402 |
|
q.add(new Integer(1)); |
403 |
|
q.add(new Integer(2)); |
404 |
|
q.add(new Integer(3)); |
405 |
|
Iterator it = q.iterator(); |
406 |
< |
it.next(); |
406 |
> |
assertEquals(it.next(), 1); |
407 |
|
it.remove(); |
408 |
|
it = q.iterator(); |
409 |
< |
assertEquals(it.next(), new Integer(2)); |
410 |
< |
assertEquals(it.next(), new Integer(3)); |
409 |
> |
assertEquals(it.next(), 2); |
410 |
> |
assertEquals(it.next(), 3); |
411 |
|
assertFalse(it.hasNext()); |
412 |
|
} |
413 |
|
|
414 |
|
/** |
415 |
< |
* Descending iterator iterates through all elements |
415 |
> |
* Descending iterator iterates through all elements |
416 |
|
*/ |
417 |
|
public void testDescendingIterator() { |
418 |
|
LinkedList q = populatedQueue(SIZE); |
419 |
|
int i = 0; |
420 |
< |
Iterator it = q.descendingIterator(); |
421 |
< |
while(it.hasNext()) { |
420 |
> |
Iterator it = q.descendingIterator(); |
421 |
> |
while (it.hasNext()) { |
422 |
|
assertTrue(q.contains(it.next())); |
423 |
|
++i; |
424 |
|
} |
426 |
|
assertFalse(it.hasNext()); |
427 |
|
try { |
428 |
|
it.next(); |
429 |
< |
} catch(NoSuchElementException success) { |
430 |
< |
} |
429 |
> |
shouldThrow(); |
430 |
> |
} catch (NoSuchElementException success) {} |
431 |
|
} |
432 |
|
|
433 |
|
/** |
434 |
< |
* Descending iterator ordering is reverse FIFO |
434 |
> |
* Descending iterator ordering is reverse FIFO |
435 |
|
*/ |
436 |
|
public void testDescendingIteratorOrdering() { |
437 |
|
final LinkedList q = new LinkedList(); |
440 |
|
q.add(new Integer(1)); |
441 |
|
int k = 0; |
442 |
|
for (Iterator it = q.descendingIterator(); it.hasNext();) { |
443 |
< |
int i = ((Integer)(it.next())).intValue(); |
460 |
< |
assertEquals(++k, i); |
443 |
> |
assertEquals(++k, it.next()); |
444 |
|
} |
445 |
|
|
446 |
|
assertEquals(3, k); |
449 |
|
/** |
450 |
|
* descendingIterator.remove removes current element |
451 |
|
*/ |
452 |
< |
public void testDescendingIteratorRemove () { |
452 |
> |
public void testDescendingIteratorRemove() { |
453 |
|
final LinkedList q = new LinkedList(); |
454 |
< |
q.add(new Integer(3)); |
455 |
< |
q.add(new Integer(2)); |
456 |
< |
q.add(new Integer(1)); |
454 |
> |
q.add(three); |
455 |
> |
q.add(two); |
456 |
> |
q.add(one); |
457 |
|
Iterator it = q.descendingIterator(); |
458 |
|
it.next(); |
459 |
|
it.remove(); |
460 |
|
it = q.descendingIterator(); |
461 |
< |
assertEquals(it.next(), new Integer(2)); |
462 |
< |
assertEquals(it.next(), new Integer(3)); |
461 |
> |
assertSame(it.next(), two); |
462 |
> |
assertSame(it.next(), three); |
463 |
|
assertFalse(it.hasNext()); |
464 |
|
} |
465 |
|
|
480 |
|
*/ |
481 |
|
public void testAddFirst() { |
482 |
|
LinkedList q = populatedQueue(3); |
483 |
< |
q.addFirst(four); |
484 |
< |
assertEquals(four,q.peek()); |
483 |
> |
q.addFirst(four); |
484 |
> |
assertSame(four, q.peek()); |
485 |
|
} |
486 |
|
|
487 |
|
/** |
489 |
|
*/ |
490 |
|
public void testPush() { |
491 |
|
LinkedList q = populatedQueue(3); |
492 |
< |
q.pollLast(); |
493 |
< |
q.push(four); |
511 |
< |
assertEquals(four,q.peekFirst()); |
492 |
> |
q.push(four); |
493 |
> |
assertSame(four, q.peekFirst()); |
494 |
|
} |
495 |
|
|
496 |
|
/** |
497 |
< |
* pop removes next element, or throws NSEE if empty |
497 |
> |
* pop removes next element, or throws NSEE if empty |
498 |
|
*/ |
499 |
|
public void testPop() { |
500 |
|
LinkedList q = populatedQueue(SIZE); |
501 |
|
for (int i = 0; i < SIZE; ++i) { |
502 |
< |
assertEquals(i, ((Integer)q.pop()).intValue()); |
502 |
> |
assertEquals(i, q.pop()); |
503 |
|
} |
504 |
|
try { |
505 |
|
q.pop(); |
506 |
|
shouldThrow(); |
507 |
< |
} catch (NoSuchElementException success){ |
526 |
< |
} |
507 |
> |
} catch (NoSuchElementException success) {} |
508 |
|
} |
509 |
|
|
510 |
|
/** |
526 |
|
} |
527 |
|
|
528 |
|
/** |
529 |
< |
* pollLast succeeds unless empty |
529 |
> |
* pollLast succeeds unless empty |
530 |
|
*/ |
531 |
|
public void testPollLast() { |
532 |
|
LinkedList q = populatedQueue(SIZE); |
533 |
|
for (int i = SIZE-1; i >= 0; --i) { |
534 |
< |
assertEquals(i, ((Integer)q.pollLast()).intValue()); |
534 |
> |
assertEquals(i, q.pollLast()); |
535 |
|
} |
536 |
< |
assertNull(q.pollLast()); |
536 |
> |
assertNull(q.pollLast()); |
537 |
|
} |
538 |
|
|
539 |
|
/** |
540 |
< |
* peekFirst returns next element, or null if empty |
540 |
> |
* peekFirst returns next element, or null if empty |
541 |
|
*/ |
542 |
|
public void testPeekFirst() { |
543 |
|
LinkedList q = populatedQueue(SIZE); |
544 |
|
for (int i = 0; i < SIZE; ++i) { |
545 |
< |
assertEquals(i, ((Integer)q.peekFirst()).intValue()); |
546 |
< |
q.pollFirst(); |
545 |
> |
assertEquals(i, q.peekFirst()); |
546 |
> |
assertEquals(i, q.pollFirst()); |
547 |
|
assertTrue(q.peekFirst() == null || |
548 |
< |
i != ((Integer)q.peekFirst()).intValue()); |
548 |
> |
!q.peekFirst().equals(i)); |
549 |
|
} |
550 |
< |
assertNull(q.peekFirst()); |
550 |
> |
assertNull(q.peekFirst()); |
551 |
|
} |
552 |
|
|
553 |
|
|
554 |
|
/** |
555 |
< |
* peekLast returns next element, or null if empty |
555 |
> |
* peekLast returns next element, or null if empty |
556 |
|
*/ |
557 |
|
public void testPeekLast() { |
558 |
|
LinkedList q = populatedQueue(SIZE); |
559 |
|
for (int i = SIZE-1; i >= 0; --i) { |
560 |
< |
assertEquals(i, ((Integer)q.peekLast()).intValue()); |
561 |
< |
q.pollLast(); |
560 |
> |
assertEquals(i, q.peekLast()); |
561 |
> |
assertEquals(i, q.pollLast()); |
562 |
|
assertTrue(q.peekLast() == null || |
563 |
< |
i != ((Integer)q.peekLast()).intValue()); |
563 |
> |
!q.peekLast().equals(i)); |
564 |
|
} |
565 |
< |
assertNull(q.peekLast()); |
565 |
> |
assertNull(q.peekLast()); |
566 |
|
} |
567 |
|
|
568 |
|
public void testFirstElement() { |
569 |
|
LinkedList q = populatedQueue(SIZE); |
570 |
|
for (int i = 0; i < SIZE; ++i) { |
571 |
< |
assertEquals(i, ((Integer)q.getFirst()).intValue()); |
572 |
< |
q.pollFirst(); |
571 |
> |
assertEquals(i, q.getFirst()); |
572 |
> |
assertEquals(i, q.pollFirst()); |
573 |
|
} |
574 |
|
try { |
575 |
|
q.getFirst(); |
576 |
|
shouldThrow(); |
577 |
< |
} |
597 |
< |
catch (NoSuchElementException success) {} |
577 |
> |
} catch (NoSuchElementException success) {} |
578 |
|
} |
579 |
|
|
580 |
|
/** |
581 |
< |
* getLast returns next element, or throws NSEE if empty |
581 |
> |
* getLast returns next element, or throws NSEE if empty |
582 |
|
*/ |
583 |
|
public void testLastElement() { |
584 |
|
LinkedList q = populatedQueue(SIZE); |
585 |
|
for (int i = SIZE-1; i >= 0; --i) { |
586 |
< |
assertEquals(i, ((Integer)q.getLast()).intValue()); |
587 |
< |
q.pollLast(); |
586 |
> |
assertEquals(i, q.getLast()); |
587 |
> |
assertEquals(i, q.pollLast()); |
588 |
|
} |
589 |
|
try { |
590 |
|
q.getLast(); |
591 |
|
shouldThrow(); |
592 |
< |
} |
593 |
< |
catch (NoSuchElementException success) {} |
614 |
< |
assertNull(q.peekLast()); |
592 |
> |
} catch (NoSuchElementException success) {} |
593 |
> |
assertNull(q.peekLast()); |
594 |
|
} |
595 |
|
|
596 |
|
/** |