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.18 by jsr166, Thu Nov 4 01:04:54 2010 UTC vs.
Revision 1.19 by jsr166, Fri Nov 5 00:17:22 2010 UTC

# Line 29 | Line 29 | public class PriorityQueueTest extends J
29       * Create a queue of given size containing consecutive
30       * Integers 0 ... n.
31       */
32 <    private PriorityQueue populatedQueue(int n) {
33 <        PriorityQueue q = new PriorityQueue(n);
32 >    private PriorityQueue<Integer> populatedQueue(int n) {
33 >        PriorityQueue<Integer> q = new PriorityQueue<Integer>(n);
34          assertTrue(q.isEmpty());
35          for (int i = n-1; i >= 0; i-=2)
36              assertTrue(q.offer(new Integer(i)));
# Line 415 | Line 415 | public class PriorityQueueTest extends J
415       * toArray(a) contains all elements
416       */
417      public void testToArray2() {
418 <        PriorityQueue q = populatedQueue(SIZE);
418 >        PriorityQueue<Integer> q = populatedQueue(SIZE);
419          Integer[] ints = new Integer[SIZE];
420 <        assertSame(ints, q.toArray(ints));
420 >        Integer[] array = q.toArray(ints);
421 >        assertSame(ints, array);
422          Arrays.sort(ints);
423          for (int i = 0; i < ints.length; i++)
424              assertSame(ints[i], q.poll());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines