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

Comparing jsr166/src/test/tck/ConcurrentSkipListSubSetTest.java (file contents):
Revision 1.20 by jsr166, Tue May 31 16:16:23 2011 UTC vs.
Revision 1.25 by jsr166, Wed Dec 31 16:44:01 2014 UTC

# Line 6 | Line 6
6  
7   import junit.framework.*;
8   import java.util.Arrays;
9 import java.util.BitSet;
10 import java.util.Collection;
9   import java.util.Comparator;
10   import java.util.Iterator;
11   import java.util.NavigableSet;
14 import java.util.NoSuchElementException;
15 import java.util.Random;
16 import java.util.Set;
12   import java.util.SortedSet;
13   import java.util.concurrent.ConcurrentSkipListSet;
14  
# Line 32 | Line 27 | public class ConcurrentSkipListSubSetTes
27      }
28  
29      /**
30 <     * Create a set of given size containing consecutive
30 >     * Returns a new set of given size containing consecutive
31       * Integers 0 ... n.
32       */
33      private NavigableSet<Integer> populatedSet(int n) {
# Line 53 | Line 48 | public class ConcurrentSkipListSubSetTes
48      }
49  
50      /**
51 <     * Create set of first 5 ints
51 >     * Returns a new set of first 5 ints.
52       */
53      private NavigableSet set5() {
54          ConcurrentSkipListSet q = new ConcurrentSkipListSet();
# Line 71 | Line 66 | public class ConcurrentSkipListSubSetTes
66      }
67  
68      /**
69 <     * Create set of first 5 negative ints
69 >     * Returns a new set of first 5 negative ints.
70       */
71      private NavigableSet dset5() {
72          ConcurrentSkipListSet q = new ConcurrentSkipListSet();
# Line 454 | Line 449 | public class ConcurrentSkipListSubSetTes
449              assertTrue(q.contains(it.next()));
450              ++i;
451          }
452 <        assertEquals(i, 0);
452 >        assertEquals(0, i);
453      }
454  
455      /**
# Line 494 | Line 489 | public class ConcurrentSkipListSubSetTes
489          NavigableSet x = populatedSet(SIZE);
490          NavigableSet y = serialClone(x);
491  
492 <        assertTrue(x != y);
492 >        assertNotSame(y, x);
493          assertEquals(x.size(), y.size());
494          assertEquals(x, y);
495          assertEquals(y, x);
# Line 954 | Line 949 | public class ConcurrentSkipListSubSetTes
949              assertTrue(q.contains(it.next()));
950              ++i;
951          }
952 <        assertEquals(i, 0);
952 >        assertEquals(0, i);
953      }
954  
955      /**
# Line 994 | Line 989 | public class ConcurrentSkipListSubSetTes
989          NavigableSet x = dset5();
990          NavigableSet y = serialClone(x);
991  
992 <        assertTrue(x != y);
992 >        assertNotSame(y, x);
993          assertEquals(x.size(), y.size());
994          assertEquals(x, y);
995          assertEquals(y, x);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines