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

Comparing jsr166/src/test/tck/LinkedListTest.java (file contents):
Revision 1.22 by jsr166, Wed Nov 3 16:46:34 2010 UTC vs.
Revision 1.23 by jsr166, Thu Nov 4 01:04:54 2010 UTC

# Line 318 | Line 318 | public class LinkedListTest extends JSR1
318      }
319  
320      /**
321 <     * toArray contains all elements
321 >     * toArray contains all elements in FIFO order
322       */
323      public void testToArray() {
324          LinkedList q = populatedQueue(SIZE);
325          Object[] o = q.toArray();
326        Arrays.sort(o);
326          for (int i = 0; i < o.length; i++)
327 <            assertEquals(o[i], q.poll());
327 >            assertSame(o[i], q.poll());
328      }
329  
330      /**
331 <     * toArray(a) contains all elements
331 >     * toArray(a) contains all elements in FIFO order
332       */
333      public void testToArray2() {
334          LinkedList q = populatedQueue(SIZE);
335          Integer[] ints = new Integer[SIZE];
336 <        ints = (Integer[])q.toArray(ints);
338 <        Arrays.sort(ints);
336 >        assertSame(ints, q.toArray(ints));
337          for (int i = 0; i < ints.length; i++)
338 <            assertEquals(ints[i], q.poll());
338 >            assertSame(ints[i], q.poll());
339      }
340  
341      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines