36 |
|
} |
37 |
|
|
38 |
|
public static void main(String[] args) { |
39 |
< |
junit.textui.TestRunner.run(suite()); |
39 |
> |
main(suite(), args); |
40 |
|
} |
41 |
|
|
42 |
|
public static Test suite() { |
434 |
|
public void testIterator() { testIterator(false); } |
435 |
|
public void testIterator_fair() { testIterator(true); } |
436 |
|
public void testIterator(boolean fair) { |
437 |
< |
final SynchronousQueue q = new SynchronousQueue(fair); |
438 |
< |
Iterator it = q.iterator(); |
439 |
< |
assertFalse(it.hasNext()); |
440 |
< |
try { |
441 |
< |
Object x = it.next(); |
442 |
< |
shouldThrow(); |
443 |
< |
} catch (NoSuchElementException success) {} |
437 |
> |
assertIteratorExhausted(new SynchronousQueue(fair).iterator()); |
438 |
|
} |
439 |
|
|
440 |
|
/** |