< prev index next >
test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java
Print this page
@@ -118,12 +118,12 @@
add(description + "ADD", () -> new CollectionSource(c -> c.add(newValue)));
add(description + "REMOVE", () -> new CollectionSource(c -> c.remove(c.iterator().next())));
}
void addList(Function<Collection<T>, ? extends List<T>> l) {
- // @@@ If collection is instance of List then add sub-list tests
addCollection(l);
+ addCollection(l.andThen(list -> list.subList(0, list.size())));
}
void addMap(Function<Map<T, T>, ? extends Map<T, T>> mapConstructor) {
class MapSource<U> implements Source<U> {
final Map<T, T> m = mapConstructor.apply(mExp);
< prev index next >