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

Comparing jsr166/src/test/tck/PriorityQueueTest.java (file contents):
Revision 1.34 by jsr166, Fri May 15 18:21:19 2015 UTC vs.
Revision 1.35 by jsr166, Sat May 23 00:53:08 2015 UTC

# Line 89 | Line 89 | public class PriorityQueueTest extends J
89       */
90      public void testConstructor5() {
91          Integer[] ints = new Integer[SIZE];
92 <        for (int i = 0; i < SIZE-1; ++i)
92 >        for (int i = 0; i < SIZE - 1; ++i)
93              ints[i] = new Integer(i);
94          try {
95              new PriorityQueue(Arrays.asList(ints));
# Line 120 | Line 120 | public class PriorityQueueTest extends J
120          for (int i = 0; i < SIZE; ++i)
121              ints[i] = new Integer(i);
122          q.addAll(Arrays.asList(ints));
123 <        for (int i = SIZE-1; i >= 0; --i)
123 >        for (int i = SIZE - 1; i >= 0; --i)
124              assertEquals(ints[i], q.poll());
125      }
126  
# Line 144 | Line 144 | public class PriorityQueueTest extends J
144      public void testSize() {
145          PriorityQueue q = populatedQueue(SIZE);
146          for (int i = 0; i < SIZE; ++i) {
147 <            assertEquals(SIZE-i, q.size());
147 >            assertEquals(SIZE - i, q.size());
148              q.remove();
149          }
150          for (int i = 0; i < SIZE; ++i) {
# Line 236 | Line 236 | public class PriorityQueueTest extends J
236      public void testAddAll3() {
237          PriorityQueue q = new PriorityQueue(SIZE);
238          Integer[] ints = new Integer[SIZE];
239 <        for (int i = 0; i < SIZE-1; ++i)
239 >        for (int i = 0; i < SIZE - 1; ++i)
240              ints[i] = new Integer(i);
241          try {
242              q.addAll(Arrays.asList(ints));
# Line 251 | Line 251 | public class PriorityQueueTest extends J
251          Integer[] empty = new Integer[0];
252          Integer[] ints = new Integer[SIZE];
253          for (int i = 0; i < SIZE; ++i)
254 <            ints[i] = new Integer(SIZE-1-i);
254 >            ints[i] = new Integer(SIZE - 1 - i);
255          PriorityQueue q = new PriorityQueue(SIZE);
256          assertFalse(q.addAll(Arrays.asList(empty)));
257          assertTrue(q.addAll(Arrays.asList(ints)));
# Line 388 | Line 388 | public class PriorityQueueTest extends J
388                  assertTrue(changed);
389  
390              assertTrue(q.containsAll(p));
391 <            assertEquals(SIZE-i, q.size());
391 >            assertEquals(SIZE - i, q.size());
392              p.remove();
393          }
394      }
# Line 401 | Line 401 | public class PriorityQueueTest extends J
401              PriorityQueue q = populatedQueue(SIZE);
402              PriorityQueue p = populatedQueue(i);
403              assertTrue(q.removeAll(p));
404 <            assertEquals(SIZE-i, q.size());
404 >            assertEquals(SIZE - i, q.size());
405              for (int j = 0; j < i; ++j) {
406                  Integer x = (Integer)(p.remove());
407                  assertFalse(q.contains(x));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines