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

Comparing jsr166/src/test/jtreg/util/Collections/CheckedSetBash.java (file contents):
Revision 1.6 by jsr166, Sun Oct 18 17:03:25 2015 UTC vs.
Revision 1.7 by jsr166, Sun Oct 18 17:34:26 2015 UTC

# Line 146 | Line 146 | public class CheckedSetBash {
146          ArrayList<Object[]> iters = new ArrayList<>(makeCheckedSets());
147          iters.ensureCapacity(numItr * iters.size());
148          for (int each=1; each < numItr; each++) {
149 <            iters.addAll( makeCheckedSets());
149 >            iters.addAll(makeCheckedSets());
150          }
151          return iters.iterator();
152      }
153  
154      public static Collection<Object[]> makeCheckedSets() {
155 <        return Arrays.asList(
156 <            new Object[]{"Collections.checkedSet(HashSet)",
157 <                (Supplier) () -> {return Collections.checkedSet(new HashSet(), Integer.class);}},
158 <            new Object[]{"Collections.checkedSet(TreeSet(reverseOrder))",
159 <                (Supplier) () -> {return Collections.checkedSet(new TreeSet(Collections.reverseOrder()), Integer.class);}},
160 <            new Object[]{"Collections.checkedSet(TreeSet.descendingSet())",
161 <                (Supplier) () -> {return Collections.checkedSet(new TreeSet().descendingSet(), Integer.class);}},
162 <            new Object[]{"Collections.checkedNavigableSet(TreeSet)",
163 <                (Supplier) () -> {return Collections.checkedNavigableSet(new TreeSet(), Integer.class);}},
164 <            new Object[]{"Collections.checkedNavigableSet(TreeSet(reverseOrder))",
165 <                (Supplier) () -> {return Collections.checkedNavigableSet(new TreeSet(Collections.reverseOrder()), Integer.class);}},
166 <            new Object[]{"Collections.checkedNavigableSet(TreeSet.descendingSet())",
167 <                (Supplier) () -> {return Collections.checkedNavigableSet(new TreeSet().descendingSet(), Integer.class);}}
168 <            );
155 >        Object[][] params = {
156 >            {"Collections.checkedSet(HashSet)",
157 >             (Supplier) () -> Collections.checkedSet(new HashSet(), Integer.class)},
158 >            {"Collections.checkedSet(TreeSet(reverseOrder))",
159 >             (Supplier) () -> Collections.checkedSet(new TreeSet(Collections.reverseOrder()), Integer.class)},
160 >            {"Collections.checkedSet(TreeSet.descendingSet())",
161 >             (Supplier) () -> Collections.checkedSet(new TreeSet().descendingSet(), Integer.class)},
162 >            {"Collections.checkedNavigableSet(TreeSet)",
163 >             (Supplier) () -> Collections.checkedNavigableSet(new TreeSet(), Integer.class)},
164 >            {"Collections.checkedNavigableSet(TreeSet(reverseOrder))",
165 >             (Supplier) () -> Collections.checkedNavigableSet(new TreeSet(Collections.reverseOrder()), Integer.class)},
166 >            {"Collections.checkedNavigableSet(TreeSet.descendingSet())",
167 >             (Supplier) () -> Collections.checkedNavigableSet(new TreeSet().descendingSet(), Integer.class)},
168 >        };
169 >        return Arrays.asList(params);
170      }
171   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines