ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/VectorTest.java
(Generate patch)

Comparing jsr166/src/test/tck/VectorTest.java (file contents):
Revision 1.7 by jsr166, Tue Apr 3 00:59:22 2018 UTC vs.
Revision 1.9 by jsr166, Tue May 8 00:32:20 2018 UTC

# Line 5 | Line 5
5   * http://creativecommons.org/publicdomain/zero/1.0/
6   */
7  
8 import java.util.ArrayList;
8   import java.util.Arrays;
9   import java.util.Collection;
10   import java.util.Collections;
# Line 30 | Line 29 | public class VectorTest extends JSR166Te
29          }
30          class SubListImplementation extends Implementation {
31              public List emptyCollection() {
32 <                return super.emptyCollection().subList(0, 0);
32 >                List list = super.emptyCollection();
33 >                ThreadLocalRandom rnd = ThreadLocalRandom.current();
34 >                if (rnd.nextBoolean())
35 >                    list.add(makeElement(rnd.nextInt()));
36 >                int i = rnd.nextInt(list.size() + 1);
37 >                return list.subList(i, i);
38              }
39          }
40          return newTestSuite(

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines