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.34 by jsr166, Sun May 24 01:42:14 2015 UTC vs.
Revision 1.38 by jsr166, Sun Jan 7 22:59:18 2018 UTC

# Line 30 | Line 30 | public class ConcurrentSkipListSubSetTes
30  
31      /**
32       * Returns a new set of given size containing consecutive
33 <     * Integers 0 ... n.
33 >     * Integers 0 ... n - 1.
34       */
35 <    private NavigableSet<Integer> populatedSet(int n) {
36 <        ConcurrentSkipListSet<Integer> q =
37 <            new ConcurrentSkipListSet<Integer>();
35 >    private static NavigableSet<Integer> populatedSet(int n) {
36 >        ConcurrentSkipListSet<Integer> q = new ConcurrentSkipListSet<>();
37          assertTrue(q.isEmpty());
38  
39          for (int i = n - 1; i >= 0; i -= 2)
# Line 52 | Line 51 | public class ConcurrentSkipListSubSetTes
51      /**
52       * Returns a new set of first 5 ints.
53       */
54 <    private NavigableSet set5() {
54 >    private static NavigableSet set5() {
55          ConcurrentSkipListSet q = new ConcurrentSkipListSet();
56          assertTrue(q.isEmpty());
57          q.add(one);
# Line 70 | Line 69 | public class ConcurrentSkipListSubSetTes
69      /**
70       * Returns a new set of first 5 negative ints.
71       */
72 <    private NavigableSet dset5() {
72 >    private static NavigableSet dset5() {
73          ConcurrentSkipListSet q = new ConcurrentSkipListSet();
74          assertTrue(q.isEmpty());
75          q.add(m1);
# Line 476 | Line 475 | public class ConcurrentSkipListSubSetTes
475      }
476  
477      /**
478 <     * A deserialized serialized set has same elements
478 >     * A deserialized/reserialized set equals original
479       */
480      public void testSerialization() throws Exception {
481          NavigableSet x = populatedSet(SIZE);
# Line 975 | Line 974 | public class ConcurrentSkipListSubSetTes
974      }
975  
976      /**
977 <     * A deserialized serialized set has same elements
977 >     * A deserialized/reserialized set equals original
978       */
979      public void testDescendingSerialization() throws Exception {
980          NavigableSet x = dset5();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines