--- jsr166/src/test/tck/TreeSetTest.java 2006/04/20 20:35:00 1.3 +++ jsr166/src/test/tck/TreeSetTest.java 2009/11/02 20:28:32 1.4 @@ -11,13 +11,13 @@ import java.io.*; public class TreeSetTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run (suite()); + junit.textui.TestRunner.run (suite()); } public static Test suite() { return new TestSuite(TreeSetTest.class); } - static class MyReverseComparator implements Comparator { + static class MyReverseComparator implements Comparator { public int compare(Object x, Object y) { int i = ((Integer)x).intValue(); int j = ((Integer)y).intValue(); @@ -62,7 +62,7 @@ public class TreeSetTest extends JSR166T assertEquals(5, q.size()); return q; } - + /** * A new set has unbounded capacity */ @@ -177,7 +177,7 @@ public class TreeSetTest extends JSR166T TreeSet q = populatedSet(SIZE); q.add(null); shouldThrow(); - } catch (NullPointerException success) { } + } catch (NullPointerException success) { } } /** @@ -306,7 +306,7 @@ public class TreeSetTest extends JSR166T } assertTrue(q.isEmpty()); } - + /** * contains(x) reports true when elements added but not yet removed */ @@ -382,7 +382,7 @@ public class TreeSetTest extends JSR166T } } - + /** * lower returns preceding element @@ -482,7 +482,7 @@ public class TreeSetTest extends JSR166T for(int i = 0; i < ints.length; i++) assertEquals(ints[i], q.pollFirst()); } - + /** * iterator iterates through all elements */ @@ -540,10 +540,10 @@ public class TreeSetTest extends JSR166T for (int i = 0; i < SIZE; ++i) { assertTrue(s.indexOf(String.valueOf(i)) >= 0); } - } + } /** - * A deserialized serialized set has same elements + * A deserialized serialized set has same elements */ public void testSerialization() { TreeSet q = populatedSet(SIZE); @@ -557,7 +557,7 @@ public class TreeSetTest extends JSR166T ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(bin)); TreeSet r = (TreeSet)in.readObject(); assertEquals(q.size(), r.size()); - while (!q.isEmpty()) + while (!q.isEmpty()) assertEquals(q.pollFirst(), r.pollFirst()); } catch(Exception e){ e.printStackTrace();