21 |
|
import junit.framework.Test; |
22 |
|
import junit.framework.TestSuite; |
23 |
|
|
24 |
+ |
@SuppressWarnings({"unchecked", "rawtypes"}) |
25 |
|
public class LinkedTransferQueueTest extends JSR166TestCase { |
26 |
|
|
27 |
|
public static void main(String[] args) { |
552 |
|
public void testIterator() throws InterruptedException { |
553 |
|
LinkedTransferQueue q = populatedQueue(SIZE); |
554 |
|
Iterator it = q.iterator(); |
555 |
+ |
int i = 0; |
556 |
|
while (it.hasNext()) { |
557 |
< |
assertEquals(it.next(), q.take()); |
557 |
> |
assertEquals(it.next(), i++); |
558 |
|
} |
559 |
+ |
assertEquals(i, SIZE); |
560 |
|
} |
561 |
|
|
562 |
|
/** |