ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Collections/CheckedListBash.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Collections/CheckedListBash.java (file contents):
Revision 1.5 by jsr166, Mon Dec 5 04:08:46 2011 UTC vs.
Revision 1.6 by jsr166, Wed Sep 9 21:47:59 2015 UTC

# Line 26 | Line 26
26   * @bug     4904067
27   * @summary Unit test for Collections.checkedList
28   * @author  Josh Bloch
29 + * @key randomness
30   */
31  
32   import java.util.*;
# Line 201 | Line 202 | public class CheckedListBash {
202      }
203  
204      static List newList() {
205 <        List s = Collections.checkedList(new ArrayList(), Integer.class);
205 >        List s =  Collections.checkedList(new ArrayList(), Integer.class);
206          if (!s.isEmpty())
207              fail("New instance non empty.");
208          return s;
# Line 214 | Line 215 | public class CheckedListBash {
215  
216              int preSize = s.size();
217              if (!s.add(e))
218 <                fail("Add failed.");
218 >                fail ("Add failed.");
219              int postSize = s.size();
220              if (postSize-preSize != 1)
221 <                fail("Add didn't increase size by 1.");
221 >                fail ("Add didn't increase size by 1.");
222          }
223      }
224  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines