--- jsr166/src/test/extra166y/ParallelArrayAsListTest.java 2010/10/16 16:38:37 1.6 +++ jsr166/src/test/extra166y/ParallelArrayAsListTest.java 2013/02/18 03:15:10 1.11 @@ -1,7 +1,7 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ * Other contributors include Andrew Wright, Jeffrey Hayes, * Pat Fisher, Mike Judd. */ @@ -13,7 +13,7 @@ import jsr166y.*; import extra166y.*; import java.io.*; -public class ParallelArrayAsListTest extends JSR166TestCase{ +public class ParallelArrayAsListTest extends JSR166TestCase { public static void main(String[] args) { junit.textui.TestRunner.run(suite()); @@ -143,7 +143,7 @@ public class ParallelArrayAsListTest ext } /** - * get returns the value at the given index + * get returns the value at the given index */ public void testGet() { List full = populatedArray(3); @@ -298,8 +298,7 @@ public class ParallelArrayAsListTest ext public void testToArray2() { List full = populatedArray(3); Integer[] i = new Integer[3]; - i = (Integer[])full.toArray(i); - assertEquals(3, i.length); + assertSame(i, full.toArray(i)); assertEquals(0, i[0].intValue()); assertEquals(1, i[1].intValue()); assertEquals(2, i[2].intValue()); @@ -322,11 +321,11 @@ public class ParallelArrayAsListTest ext } List s = a.subList(2, 5); - assertEquals(s.size(), 3); + assertEquals(3, s.size()); s.set(2, m1); assertEquals(a.get(4), m1); s.clear(); - assertEquals(a.size(), 7); + assertEquals(7, a.size()); } // Exception tests