--- jsr166/src/test/tck/ConcurrentSkipListSubSetTest.java 2015/02/28 18:10:55 1.30 +++ jsr166/src/test/tck/ConcurrentSkipListSubSetTest.java 2015/05/23 00:53:08 1.33 @@ -16,7 +16,7 @@ import junit.framework.TestSuite; public class ConcurrentSkipListSubSetTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); + main(suite(), args); } public static Test suite() { return new TestSuite(ConcurrentSkipListSubSetTest.class); @@ -122,7 +122,7 @@ public class ConcurrentSkipListSubSetTes public void testSize() { NavigableSet q = populatedSet(SIZE); for (int i = 0; i < SIZE; ++i) { - assertEquals(SIZE-i, q.size()); + assertEquals(SIZE - i, q.size()); q.pollFirst(); } for (int i = 0; i < SIZE; ++i) { @@ -167,7 +167,6 @@ public class ConcurrentSkipListSubSetTes try { q.add(new Object()); q.add(new Object()); - q.add(new Object()); shouldThrow(); } catch (ClassCastException success) {} } @@ -202,8 +201,8 @@ public class ConcurrentSkipListSubSetTes public void testAddAll3() { NavigableSet q = set0(); Integer[] ints = new Integer[SIZE]; - for (int i = 0; i < SIZE-1; ++i) - ints[i] = new Integer(i+SIZE); + for (int i = 0; i < SIZE - 1; ++i) + ints[i] = new Integer(i + SIZE); try { q.addAll(Arrays.asList(ints)); shouldThrow(); @@ -217,7 +216,7 @@ public class ConcurrentSkipListSubSetTes Integer[] empty = new Integer[0]; Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE; ++i) - ints[i] = new Integer(SIZE-1- i); + ints[i] = new Integer(SIZE - 1 - i); NavigableSet q = set0(); assertFalse(q.addAll(Arrays.asList(empty))); assertTrue(q.addAll(Arrays.asList(ints))); @@ -311,7 +310,7 @@ public class ConcurrentSkipListSubSetTes assertTrue(changed); assertTrue(q.containsAll(p)); - assertEquals(SIZE-i, q.size()); + assertEquals(SIZE - i, q.size()); p.pollFirst(); } } @@ -324,7 +323,7 @@ public class ConcurrentSkipListSubSetTes NavigableSet q = populatedSet(SIZE); NavigableSet p = populatedSet(i); assertTrue(q.removeAll(p)); - assertEquals(SIZE-i, q.size()); + assertEquals(SIZE - i, q.size()); for (int j = 0; j < i; ++j) { Integer x = (Integer)(p.pollFirst()); assertFalse(q.contains(x)); @@ -619,7 +618,7 @@ public class ConcurrentSkipListSubSetTes public void testDescendingSize() { NavigableSet q = populatedSet(SIZE); for (int i = 0; i < SIZE; ++i) { - assertEquals(SIZE-i, q.size()); + assertEquals(SIZE - i, q.size()); q.pollFirst(); } for (int i = 0; i < SIZE; ++i) { @@ -664,7 +663,6 @@ public class ConcurrentSkipListSubSetTes try { q.add(new Object()); q.add(new Object()); - q.add(new Object()); shouldThrow(); } catch (ClassCastException success) {} } @@ -699,8 +697,8 @@ public class ConcurrentSkipListSubSetTes public void testDescendingAddAll3() { NavigableSet q = dset0(); Integer[] ints = new Integer[SIZE]; - for (int i = 0; i < SIZE-1; ++i) - ints[i] = new Integer(i+SIZE); + for (int i = 0; i < SIZE - 1; ++i) + ints[i] = new Integer(i + SIZE); try { q.addAll(Arrays.asList(ints)); shouldThrow(); @@ -714,7 +712,7 @@ public class ConcurrentSkipListSubSetTes Integer[] empty = new Integer[0]; Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE; ++i) - ints[i] = new Integer(SIZE-1- i); + ints[i] = new Integer(SIZE - 1 - i); NavigableSet q = dset0(); assertFalse(q.addAll(Arrays.asList(empty))); assertTrue(q.addAll(Arrays.asList(ints))); @@ -802,7 +800,7 @@ public class ConcurrentSkipListSubSetTes assertTrue(changed); assertTrue(q.containsAll(p)); - assertEquals(SIZE-i, q.size()); + assertEquals(SIZE - i, q.size()); p.pollFirst(); } } @@ -815,7 +813,7 @@ public class ConcurrentSkipListSubSetTes NavigableSet q = populatedSet(SIZE); NavigableSet p = populatedSet(i); assertTrue(q.removeAll(p)); - assertEquals(SIZE-i, q.size()); + assertEquals(SIZE - i, q.size()); for (int j = 0; j < i; ++j) { Integer x = (Integer)(p.pollFirst()); assertFalse(q.contains(x));