[cvs] / jsr166 / src / test / tck / ConcurrentSkipListSetTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/ConcurrentSkipListSetTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49, Sun Jan 7 22:59:18 2018 UTC revision 1.50, Mon May 28 21:36:13 2018 UTC
# Line 456  Line 456 
456       */       */
457      public void testToArray() {      public void testToArray() {
458          ConcurrentSkipListSet q = populatedSet(SIZE);          ConcurrentSkipListSet q = populatedSet(SIZE);
459          Object[] o = q.toArray();          Object[] a = q.toArray();
460          for (int i = 0; i < o.length; i++)          assertSame(Object[].class, a.getClass());
461              assertSame(o[i], q.pollFirst());          for (Object o : a)
462                assertSame(o, q.pollFirst());
463            assertTrue(q.isEmpty());
464      }      }
465    
466      /**      /**
# Line 468  Line 470 
470          ConcurrentSkipListSet<Integer> q = populatedSet(SIZE);          ConcurrentSkipListSet<Integer> q = populatedSet(SIZE);
471          Integer[] ints = new Integer[SIZE];          Integer[] ints = new Integer[SIZE];
472          assertSame(ints, q.toArray(ints));          assertSame(ints, q.toArray(ints));
473          for (int i = 0; i < ints.length; i++)          for (Integer o : ints)
474              assertSame(ints[i], q.pollFirst());              assertSame(o, q.pollFirst());
475            assertTrue(q.isEmpty());
476      }      }
477    
478      /**      /**

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8