413 |
|
if (rnd.nextBoolean()) assertTrue(it.hasNext()); |
414 |
|
it.next(); |
415 |
|
} |
416 |
– |
Consumer alwaysThrows = e -> { throw new AssertionError(); }; |
416 |
|
// TODO: many more removal methods |
417 |
|
if (rnd.nextBoolean()) { |
418 |
|
for (Iterator z = c.iterator(); z.hasNext(); ) { |
633 |
|
*/ |
634 |
|
public void testStreamForEach() throws Throwable { |
635 |
|
final Collection c = impl.emptyCollection(); |
637 |
– |
final AtomicLong count = new AtomicLong(0L); |
636 |
|
final Object x = impl.makeElement(1); |
637 |
|
final Object y = impl.makeElement(2); |
638 |
|
final ArrayList found = new ArrayList(); |
690 |
|
*/ |
691 |
|
public void testForEach() throws Throwable { |
692 |
|
final Collection c = impl.emptyCollection(); |
695 |
– |
final AtomicLong count = new AtomicLong(0L); |
693 |
|
final Object x = impl.makeElement(1); |
694 |
|
final Object y = impl.makeElement(2); |
695 |
|
final ArrayList found = new ArrayList(); |