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.16 by jsr166, Wed Aug 25 00:07:03 2010 UTC vs.
Revision 1.18 by jsr166, Thu Nov 4 01:04:54 2010 UTC

# Line 213 | Line 213 | public class PriorityQueueTest extends J
213              shouldThrow();
214          } catch (NullPointerException success) {}
215      }
216 +
217      /**
218       * addAll of a collection with null elements throws NPE
219       */
# Line 224 | Line 225 | public class PriorityQueueTest extends J
225              shouldThrow();
226          } catch (NullPointerException success) {}
227      }
228 +
229      /**
230       * addAll of a collection with any null elements throws NPE after
231       * possibly adding some elements
# Line 406 | Line 408 | public class PriorityQueueTest extends J
408          Object[] o = q.toArray();
409          Arrays.sort(o);
410          for (int i = 0; i < o.length; i++)
411 <            assertEquals(o[i], q.poll());
411 >            assertSame(o[i], q.poll());
412      }
413  
414      /**
# Line 415 | Line 417 | public class PriorityQueueTest extends J
417      public void testToArray2() {
418          PriorityQueue q = populatedQueue(SIZE);
419          Integer[] ints = new Integer[SIZE];
420 <        ints = (Integer[])q.toArray(ints);
420 >        assertSame(ints, q.toArray(ints));
421          Arrays.sort(ints);
422          for (int i = 0; i < ints.length; i++)
423 <            assertEquals(ints[i], q.poll());
423 >            assertSame(ints[i], q.poll());
424      }
425  
426      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines