# | Line 33 | Line 33 | public class PriorityQueueTest extends J | |
---|---|---|
33 | ||
34 | /** | |
35 | * Returns a new queue of given size containing consecutive | |
36 | < | * Integers 0 ... n. |
36 | > | * Integers 0 ... n - 1. |
37 | */ | |
38 | private PriorityQueue<Integer> populatedQueue(int n) { | |
39 | PriorityQueue<Integer> q = new PriorityQueue<Integer>(n); | |
# | Line 44 | Line 44 | public class PriorityQueueTest extends J | |
44 | assertTrue(q.offer(new Integer(i))); | |
45 | assertFalse(q.isEmpty()); | |
46 | assertEquals(n, q.size()); | |
47 | + | assertEquals((Integer) 0, q.peek()); |
48 | return q; | |
49 | } | |
50 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |