247 |
|
public void testPut() throws InterruptedException { |
248 |
|
LinkedBlockingQueue q = new LinkedBlockingQueue(SIZE); |
249 |
|
for (int i = 0; i < SIZE; ++i) { |
250 |
< |
Integer I = new Integer(i); |
251 |
< |
q.put(I); |
252 |
< |
assertTrue(q.contains(I)); |
250 |
> |
Integer x = new Integer(i); |
251 |
> |
q.put(x); |
252 |
> |
assertTrue(q.contains(x)); |
253 |
|
} |
254 |
|
assertEquals(0, q.remainingCapacity()); |
255 |
|
} |
589 |
|
assertTrue(q.removeAll(p)); |
590 |
|
assertEquals(SIZE-i, q.size()); |
591 |
|
for (int j = 0; j < i; ++j) { |
592 |
< |
Integer I = (Integer)(p.remove()); |
593 |
< |
assertFalse(q.contains(I)); |
592 |
> |
Integer x = (Integer)(p.remove()); |
593 |
> |
assertFalse(q.contains(x)); |
594 |
|
} |
595 |
|
} |
596 |
|
} |