157 |
|
} |
158 |
|
|
159 |
|
/** |
160 |
< |
* getFirst returns next getFirst, or throws NSEE if empty |
160 |
> |
* getFirst() returns first element, or throws NSEE if empty |
161 |
|
*/ |
162 |
|
public void testFirstElement() { |
163 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
173 |
|
} |
174 |
|
|
175 |
|
/** |
176 |
< |
* getLast returns next element, or throws NSEE if empty |
176 |
> |
* getLast() returns last element, or throws NSEE if empty |
177 |
|
*/ |
178 |
|
public void testLastElement() { |
179 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
189 |
|
} |
190 |
|
|
191 |
|
/** |
192 |
< |
* removeFirst removes next element, or throws NSEE if empty |
192 |
> |
* removeFirst() removes first element, or throws NSEE if empty |
193 |
|
*/ |
194 |
|
public void testRemoveFirst() { |
195 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
204 |
|
} |
205 |
|
|
206 |
|
/** |
207 |
< |
* removeLast removes last element, or throws NSEE if empty |
207 |
> |
* removeLast() removes last element, or throws NSEE if empty |
208 |
|
*/ |
209 |
|
public void testRemoveLast() { |
210 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
513 |
|
shouldThrow(); |
514 |
|
} catch (NullPointerException success) {} |
515 |
|
} |
516 |
+ |
|
517 |
|
/** |
518 |
|
* addAll of a collection with any null elements throws NPE after |
519 |
|
* possibly adding some elements |
528 |
|
shouldThrow(); |
529 |
|
} catch (NullPointerException success) {} |
530 |
|
} |
531 |
+ |
|
532 |
|
/** |
533 |
|
* addAll throws ISE if not enough room |
534 |
|
*/ |