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.30 by jsr166, Sat Feb 28 18:10:55 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());
169              q.add(new Object());
170              q.add(new Object());
# Line 176 | Line 176 | public class ConcurrentSkipListSubSetTes
176       * addAll(null) throws NPE
177       */
178      public void testAddAll1() {
179 +        NavigableSet q = set0();
180          try {
180            NavigableSet q = set0();
181              q.addAll(null);
182              shouldThrow();
183          } catch (NullPointerException success) {}
# Line 187 | Line 187 | public class ConcurrentSkipListSubSetTes
187       * addAll of a collection with null elements throws NPE
188       */
189      public void testAddAll2() {
190 +        NavigableSet q = set0();
191 +        Integer[] ints = new Integer[SIZE];
192          try {
191            NavigableSet q = set0();
192            Integer[] ints = new Integer[SIZE];
193              q.addAll(Arrays.asList(ints));
194              shouldThrow();
195          } catch (NullPointerException success) {}
# Line 200 | Line 200 | public class ConcurrentSkipListSubSetTes
200       * possibly adding some elements
201       */
202      public void testAddAll3() {
203 +        NavigableSet q = set0();
204 +        Integer[] ints = new Integer[SIZE];
205 +        for (int i = 0; i < SIZE-1; ++i)
206 +            ints[i] = new Integer(i+SIZE);
207          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);
208              q.addAll(Arrays.asList(ints));
209              shouldThrow();
210          } catch (NullPointerException success) {}
# Line 632 | Line 632 | public class ConcurrentSkipListSubSetTes
632       * add(null) throws NPE
633       */
634      public void testDescendingAddNull() {
635 +        NavigableSet q = dset0();
636          try {
636            NavigableSet q = dset0();
637              q.add(null);
638              shouldThrow();
639          } catch (NullPointerException success) {}
# Line 660 | Line 660 | public class ConcurrentSkipListSubSetTes
660       * Add of non-Comparable throws CCE
661       */
662      public void testDescendingAddNonComparable() {
663 +        NavigableSet q = dset0();
664          try {
664            NavigableSet q = dset0();
665              q.add(new Object());
666              q.add(new Object());
667              q.add(new Object());
# Line 673 | Line 673 | public class ConcurrentSkipListSubSetTes
673       * addAll(null) throws NPE
674       */
675      public void testDescendingAddAll1() {
676 +        NavigableSet q = dset0();
677          try {
677            NavigableSet q = dset0();
678              q.addAll(null);
679              shouldThrow();
680          } catch (NullPointerException success) {}
# Line 684 | Line 684 | public class ConcurrentSkipListSubSetTes
684       * addAll of a collection with null elements throws NPE
685       */
686      public void testDescendingAddAll2() {
687 +        NavigableSet q = dset0();
688 +        Integer[] ints = new Integer[SIZE];
689          try {
688            NavigableSet q = dset0();
689            Integer[] ints = new Integer[SIZE];
690              q.addAll(Arrays.asList(ints));
691              shouldThrow();
692          } catch (NullPointerException success) {}
# Line 697 | Line 697 | public class ConcurrentSkipListSubSetTes
697       * possibly adding some elements
698       */
699      public void testDescendingAddAll3() {
700 +        NavigableSet q = dset0();
701 +        Integer[] ints = new Integer[SIZE];
702 +        for (int i = 0; i < SIZE-1; ++i)
703 +            ints[i] = new Integer(i+SIZE);
704          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);
705              q.addAll(Arrays.asList(ints));
706              shouldThrow();
707          } catch (NullPointerException success) {}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines