ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/PriorityBlockingQueueTest.java
(Generate patch)

Comparing jsr166/src/test/tck/PriorityBlockingQueueTest.java (file contents):
Revision 1.54 by jsr166, Wed Dec 31 19:05:43 2014 UTC vs.
Revision 1.57 by jsr166, Wed Dec 31 20:17:39 2014 UTC

# Line 64 | Line 64 | public class PriorityBlockingQueueTest e
64          PriorityBlockingQueue<Integer> q =
65              new PriorityBlockingQueue<Integer>(n);
66          assertTrue(q.isEmpty());
67 <        for (int i = n-1; i >= 0; i-=2)
67 >        for (int i = n-1; i >= 0; i -= 2)
68              assertTrue(q.offer(new Integer(i)));
69 <        for (int i = (n & 1); i < n; i+=2)
69 >        for (int i = (n & 1); i < n; i += 2)
70              assertTrue(q.offer(new Integer(i)));
71          assertFalse(q.isEmpty());
72          assertEquals(NOCAP, q.remainingCapacity());
# Line 266 | Line 266 | public class PriorityBlockingQueueTest e
266      public void testPut() {
267          PriorityBlockingQueue q = new PriorityBlockingQueue(SIZE);
268          for (int i = 0; i < SIZE; ++i) {
269 <            Integer I = new Integer(i);
270 <            q.put(I);
271 <            assertTrue(q.contains(I));
269 >            Integer x = new Integer(i);
270 >            q.put(x);
271 >            assertTrue(q.contains(x));
272          }
273          assertEquals(SIZE, q.size());
274      }
# Line 530 | Line 530 | public class PriorityBlockingQueueTest e
530              assertTrue(q.removeAll(p));
531              assertEquals(SIZE-i, q.size());
532              for (int j = 0; j < i; ++j) {
533 <                Integer I = (Integer)(p.remove());
534 <                assertFalse(q.contains(I));
533 >                Integer x = (Integer)(p.remove());
534 >                assertFalse(q.contains(x));
535              }
536          }
537      }
# Line 714 | Line 714 | public class PriorityBlockingQueueTest e
714              assertEquals(SIZE-k, q.size());
715              for (int j = 0; j < k; ++j)
716                  assertEquals(l.get(j), new Integer(j));
717 <            while (q.poll() != null) ;
717 >            do {} while (q.poll() != null);
718          }
719      }
720  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines