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.21 by jsr166, Sat Nov 26 05:19:17 2011 UTC vs.
Revision 1.26 by jsr166, Wed Dec 31 19:05:42 2014 UTC

# Line 4 | Line 4
4   * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7 import junit.framework.*;
7   import java.util.Arrays;
9 import java.util.BitSet;
10 import java.util.Collection;
8   import java.util.Comparator;
9   import java.util.Iterator;
10   import java.util.NavigableSet;
14 import java.util.NoSuchElementException;
15 import java.util.Random;
16 import java.util.Set;
11   import java.util.SortedSet;
12   import java.util.concurrent.ConcurrentSkipListSet;
13  
14 + import junit.framework.Test;
15 + import junit.framework.TestSuite;
16 +
17   public class ConcurrentSkipListSubSetTest extends JSR166TestCase {
18      public static void main(String[] args) {
19          junit.textui.TestRunner.run(suite());
# Line 32 | Line 29 | public class ConcurrentSkipListSubSetTes
29      }
30  
31      /**
32 <     * Create a set of given size containing consecutive
32 >     * Returns a new set of given size containing consecutive
33       * Integers 0 ... n.
34       */
35      private NavigableSet<Integer> populatedSet(int n) {
# Line 53 | Line 50 | public class ConcurrentSkipListSubSetTes
50      }
51  
52      /**
53 <     * Create set of first 5 ints
53 >     * Returns a new set of first 5 ints.
54       */
55      private NavigableSet set5() {
56          ConcurrentSkipListSet q = new ConcurrentSkipListSet();
# Line 71 | Line 68 | public class ConcurrentSkipListSubSetTes
68      }
69  
70      /**
71 <     * Create set of first 5 negative ints
71 >     * Returns a new set of first 5 negative ints.
72       */
73      private NavigableSet dset5() {
74          ConcurrentSkipListSet q = new ConcurrentSkipListSet();
# Line 494 | Line 491 | public class ConcurrentSkipListSubSetTes
491          NavigableSet x = populatedSet(SIZE);
492          NavigableSet y = serialClone(x);
493  
494 <        assertTrue(x != y);
494 >        assertNotSame(y, x);
495          assertEquals(x.size(), y.size());
496          assertEquals(x, y);
497          assertEquals(y, x);
# Line 994 | Line 991 | public class ConcurrentSkipListSubSetTes
991          NavigableSet x = dset5();
992          NavigableSet y = serialClone(x);
993  
994 <        assertTrue(x != y);
994 >        assertNotSame(y, x);
995          assertEquals(x.size(), y.size());
996          assertEquals(x, y);
997          assertEquals(y, x);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines