--- jsr166/src/test/tck/PriorityQueueTest.java 2010/08/25 00:07:03 1.16 +++ jsr166/src/test/tck/PriorityQueueTest.java 2010/11/04 01:04:54 1.18 @@ -213,6 +213,7 @@ public class PriorityQueueTest extends J shouldThrow(); } catch (NullPointerException success) {} } + /** * addAll of a collection with null elements throws NPE */ @@ -224,6 +225,7 @@ public class PriorityQueueTest extends J shouldThrow(); } catch (NullPointerException success) {} } + /** * addAll of a collection with any null elements throws NPE after * possibly adding some elements @@ -406,7 +408,7 @@ public class PriorityQueueTest extends J Object[] o = q.toArray(); Arrays.sort(o); for (int i = 0; i < o.length; i++) - assertEquals(o[i], q.poll()); + assertSame(o[i], q.poll()); } /** @@ -415,10 +417,10 @@ public class PriorityQueueTest extends J public void testToArray2() { PriorityQueue q = populatedQueue(SIZE); Integer[] ints = new Integer[SIZE]; - ints = (Integer[])q.toArray(ints); + assertSame(ints, q.toArray(ints)); Arrays.sort(ints); for (int i = 0; i < ints.length; i++) - assertEquals(ints[i], q.poll()); + assertSame(ints[i], q.poll()); } /**