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.4 by jsr166, Wed Feb 1 20:13:47 2017 UTC vs.
Revision 1.6 by jsr166, Sat Mar 11 17:33:32 2017 UTC

# Line 6 | Line 6
6   */
7  
8   import java.util.Vector;
9 import java.util.Collection;
9   import java.util.List;
10  
11   import junit.framework.Test;
13 import junit.framework.TestSuite;
12  
13   public class VectorTest extends JSR166TestCase {
14      public static void main(String[] args) {
# Line 40 | Line 38 | public class VectorTest extends JSR166Te
38       * tests for setSize()
39       */
40      public void testSetSize() {
41 <        Vector v = new Vector();
41 >        final Vector v = new Vector();
42          for (int n : new int[] { 100, 5, 50 }) {
43              v.setSize(n);
44              assertEquals(n, v.size());
45              assertNull(v.get(0));
46              assertNull(v.get(n - 1));
47 <            assertThrows(ArrayIndexOutOfBoundsException.class,
48 <                         () -> v.setSize(-1));
47 >            assertThrows(
48 >                    ArrayIndexOutOfBoundsException.class,
49 >                    new Runnable() { public void run() { v.setSize(-1); }});
50              assertEquals(n, v.size());
51              assertNull(v.get(0));
52              assertNull(v.get(n - 1));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines