< prev index next >

test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 50,59 **** --- 50,60 ---- import static org.testng.Assert.*; /** * @test + * @bug 8148748 * @summary Spliterator last-binding and fail-fast tests * @run testng SpliteratorLateBindingFailFastTest */ @Test
*** 118,129 **** 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); } 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); --- 119,130 ---- 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) { 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 >