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

Comparing jsr166/src/test/extra166y/ParallelArrayAsListTest.java (file contents):
Revision 1.6 by jsr166, Sat Oct 16 16:38:37 2010 UTC vs.
Revision 1.11 by jsr166, Mon Feb 18 03:15:10 2013 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   * Other contributors include Andrew Wright, Jeffrey Hayes,
6   * Pat Fisher, Mike Judd.
7   */
# Line 13 | Line 13 | import jsr166y.*;
13   import extra166y.*;
14   import java.io.*;
15  
16 < public class ParallelArrayAsListTest extends JSR166TestCase{
16 > public class ParallelArrayAsListTest extends JSR166TestCase {
17  
18      public static void main(String[] args) {
19          junit.textui.TestRunner.run(suite());
# Line 143 | Line 143 | public class ParallelArrayAsListTest ext
143      }
144  
145      /**
146 <     * get returns the  value at the given index
146 >     * get returns the value at the given index
147       */
148      public void testGet() {
149          List full = populatedArray(3);
# Line 298 | Line 298 | public class ParallelArrayAsListTest ext
298      public void testToArray2() {
299          List full = populatedArray(3);
300          Integer[] i = new Integer[3];
301 <        i = (Integer[])full.toArray(i);
302 <        assertEquals(3, i.length);
301 >        assertSame(i, full.toArray(i));
302          assertEquals(0, i[0].intValue());
303          assertEquals(1, i[1].intValue());
304          assertEquals(2, i[2].intValue());
# Line 322 | Line 321 | public class ParallelArrayAsListTest ext
321          }
322  
323          List s = a.subList(2, 5);
324 <        assertEquals(s.size(), 3);
324 >        assertEquals(3, s.size());
325          s.set(2, m1);
326          assertEquals(a.get(4), m1);
327          s.clear();
328 <        assertEquals(a.size(), 7);
328 >        assertEquals(7, a.size());
329      }
330  
331      // Exception tests

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines