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.29 by jsr166, Sat Jan 17 22:55:06 2015 UTC vs.
Revision 1.31 by jsr166, Sat Feb 28 20:13:46 2015 UTC

# Line 135 | Line 135 | public class ConcurrentSkipListSubSetTes
135       * add(null) throws NPE
136       */
137      public void testAddNull() {
138 +        NavigableSet q = set0();
139          try {
139            NavigableSet q = set0();
140              q.add(null);
141              shouldThrow();
142          } catch (NullPointerException success) {}
# Line 163 | Line 163 | public class ConcurrentSkipListSubSetTes
163       * Add of non-Comparable throws CCE
164       */
165      public void testAddNonComparable() {
166 +        NavigableSet q = set0();
167          try {
167            NavigableSet q = set0();
168            q.add(new Object());
168              q.add(new Object());
169              q.add(new Object());
170              shouldThrow();
# Line 176 | Line 175 | public class ConcurrentSkipListSubSetTes
175       * addAll(null) throws NPE
176       */
177      public void testAddAll1() {
178 +        NavigableSet q = set0();
179          try {
180            NavigableSet q = set0();
180              q.addAll(null);
181              shouldThrow();
182          } catch (NullPointerException success) {}
# Line 187 | Line 186 | public class ConcurrentSkipListSubSetTes
186       * addAll of a collection with null elements throws NPE
187       */
188      public void testAddAll2() {
189 +        NavigableSet q = set0();
190 +        Integer[] ints = new Integer[SIZE];
191          try {
191            NavigableSet q = set0();
192            Integer[] ints = new Integer[SIZE];
192              q.addAll(Arrays.asList(ints));
193              shouldThrow();
194          } catch (NullPointerException success) {}
# Line 200 | Line 199 | public class ConcurrentSkipListSubSetTes
199       * possibly adding some elements
200       */
201      public void testAddAll3() {
202 +        NavigableSet q = set0();
203 +        Integer[] ints = new Integer[SIZE];
204 +        for (int i = 0; i < SIZE-1; ++i)
205 +            ints[i] = new Integer(i+SIZE);
206          try {
204            NavigableSet q = set0();
205            Integer[] ints = new Integer[SIZE];
206            for (int i = 0; i < SIZE-1; ++i)
207                ints[i] = new Integer(i+SIZE);
207              q.addAll(Arrays.asList(ints));
208              shouldThrow();
209          } catch (NullPointerException success) {}
# Line 632 | Line 631 | public class ConcurrentSkipListSubSetTes
631       * add(null) throws NPE
632       */
633      public void testDescendingAddNull() {
634 +        NavigableSet q = dset0();
635          try {
636            NavigableSet q = dset0();
636              q.add(null);
637              shouldThrow();
638          } catch (NullPointerException success) {}
# Line 660 | Line 659 | public class ConcurrentSkipListSubSetTes
659       * Add of non-Comparable throws CCE
660       */
661      public void testDescendingAddNonComparable() {
662 +        NavigableSet q = dset0();
663          try {
664            NavigableSet q = dset0();
665            q.add(new Object());
664              q.add(new Object());
665              q.add(new Object());
666              shouldThrow();
# Line 673 | Line 671 | public class ConcurrentSkipListSubSetTes
671       * addAll(null) throws NPE
672       */
673      public void testDescendingAddAll1() {
674 +        NavigableSet q = dset0();
675          try {
677            NavigableSet q = dset0();
676              q.addAll(null);
677              shouldThrow();
678          } catch (NullPointerException success) {}
# Line 684 | Line 682 | public class ConcurrentSkipListSubSetTes
682       * addAll of a collection with null elements throws NPE
683       */
684      public void testDescendingAddAll2() {
685 +        NavigableSet q = dset0();
686 +        Integer[] ints = new Integer[SIZE];
687          try {
688            NavigableSet q = dset0();
689            Integer[] ints = new Integer[SIZE];
688              q.addAll(Arrays.asList(ints));
689              shouldThrow();
690          } catch (NullPointerException success) {}
# Line 697 | Line 695 | public class ConcurrentSkipListSubSetTes
695       * possibly adding some elements
696       */
697      public void testDescendingAddAll3() {
698 +        NavigableSet q = dset0();
699 +        Integer[] ints = new Integer[SIZE];
700 +        for (int i = 0; i < SIZE-1; ++i)
701 +            ints[i] = new Integer(i+SIZE);
702          try {
701            NavigableSet q = dset0();
702            Integer[] ints = new Integer[SIZE];
703            for (int i = 0; i < SIZE-1; ++i)
704                ints[i] = new Integer(i+SIZE);
703              q.addAll(Arrays.asList(ints));
704              shouldThrow();
705          } catch (NullPointerException success) {}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines