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

Comparing jsr166/src/test/tck/ConcurrentSkipListSetTest.java (file contents):
Revision 1.16 by jsr166, Mon Oct 11 05:40:41 2010 UTC vs.
Revision 1.17 by jsr166, Thu Nov 4 01:04:54 2010 UTC

# Line 434 | Line 434 | public class ConcurrentSkipListSetTest e
434      }
435  
436      /**
437 <     * toArray contains all elements
437 >     * toArray contains all elements in sorted order
438       */
439      public void testToArray() {
440          ConcurrentSkipListSet q = populatedSet(SIZE);
441          Object[] o = q.toArray();
442        Arrays.sort(o);
442          for (int i = 0; i < o.length; i++)
443 <            assertEquals(o[i], q.pollFirst());
443 >            assertSame(o[i], q.pollFirst());
444      }
445  
446      /**
447 <     * toArray(a) contains all elements
447 >     * toArray(a) contains all elements in sorted order
448       */
449      public void testToArray2() {
450          ConcurrentSkipListSet q = populatedSet(SIZE);
451          Integer[] ints = new Integer[SIZE];
452 <        ints = (Integer[])q.toArray(ints);
454 <        Arrays.sort(ints);
452 >        assertSame(ints, q.toArray(ints));
453          for (int i = 0; i < ints.length; i++)
454 <            assertEquals(ints[i], q.pollFirst());
454 >            assertSame(ints[i], q.pollFirst());
455      }
456  
457      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines