15 |
|
|
16 |
|
public class ArrayBlockingQueueTest extends JSR166TestCase { |
17 |
|
public static void main(String[] args) { |
18 |
< |
junit.textui.TestRunner.run (suite()); |
18 |
> |
junit.textui.TestRunner.run(suite()); |
19 |
|
} |
20 |
|
public static Test suite() { |
21 |
|
return new TestSuite(ArrayBlockingQueueTest.class); |
224 |
|
shouldThrow(); |
225 |
|
} catch (NullPointerException success) {} |
226 |
|
} |
227 |
+ |
|
228 |
|
/** |
229 |
|
* addAll of a collection with any null elements throws NPE after |
230 |
|
* possibly adding some elements |
239 |
|
shouldThrow(); |
240 |
|
} catch (NullPointerException success) {} |
241 |
|
} |
242 |
+ |
|
243 |
|
/** |
244 |
|
* addAll throws ISE if not enough room |
245 |
|
*/ |
253 |
|
shouldThrow(); |
254 |
|
} catch (IllegalStateException success) {} |
255 |
|
} |
256 |
+ |
|
257 |
|
/** |
258 |
|
* Queue contains all elements, in traversal order, of successful addAll |
259 |
|
*/ |
688 |
|
/** |
689 |
|
* iterator.remove removes current element |
690 |
|
*/ |
691 |
< |
public void testIteratorRemove () { |
691 |
> |
public void testIteratorRemove() { |
692 |
|
final ArrayBlockingQueue q = new ArrayBlockingQueue(3); |
693 |
|
q.add(two); |
694 |
|
q.add(one); |
725 |
|
/** |
726 |
|
* Modifications do not cause iterators to fail |
727 |
|
*/ |
728 |
< |
public void testWeaklyConsistentIteration () { |
728 |
> |
public void testWeaklyConsistentIteration() { |
729 |
|
final ArrayBlockingQueue q = new ArrayBlockingQueue(3); |
730 |
|
q.add(one); |
731 |
|
q.add(two); |