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

Comparing jsr166/src/test/tck/TreeSetTest.java (file contents):
Revision 1.40 by jsr166, Sat May 23 00:53:08 2015 UTC vs.
Revision 1.42 by jsr166, Sun May 24 01:42:14 2015 UTC

# Line 45 | Line 45 | public class TreeSetTest extends JSR166T
45      private TreeSet<Integer> populatedSet(int n) {
46          TreeSet<Integer> q = new TreeSet<Integer>();
47          assertTrue(q.isEmpty());
48 <        for (int i = n-1; i >= 0; i -= 2)
48 >        for (int i = n - 1; i >= 0; i -= 2)
49              assertTrue(q.add(new Integer(i)));
50          for (int i = (n & 1); i < n; i += 2)
51              assertTrue(q.add(new Integer(i)));
# Line 290 | Line 290 | public class TreeSetTest extends JSR166T
290              assertTrue(q.contains(i));
291              assertTrue(q.remove(i));
292              assertFalse(q.contains(i));
293 <            assertTrue(q.contains(i-1));
293 >            assertTrue(q.contains(i - 1));
294          }
295          for (int i = 0; i < SIZE; i += 2) {
296              assertTrue(q.contains(i));
297              assertTrue(q.remove(i));
298              assertFalse(q.contains(i));
299 <            assertFalse(q.remove(i+1));
300 <            assertFalse(q.contains(i+1));
299 >            assertFalse(q.remove(i + 1));
300 >            assertFalse(q.contains(i + 1));
301          }
302          assertTrue(q.isEmpty());
303      }
# Line 903 | Line 903 | public class TreeSetTest extends JSR166T
903                  else if (element > max)
904                      return -1;
905                  int result = bs.nextSetBit(element);
906 <                return result > max ? -1 : result;
906 >                return (result > max) ? -1 : result;
907              }
908              int higherAscending(int element) {
909                  return ceilingAscending(element + 1);
910              }
911              private int firstAscending() {
912                  int result = ceilingAscending(min);
913 <                return result > max ? -1 : result;
913 >                return (result > max) ? -1 : result;
914              }
915              private int lastAscending() {
916                  int result = floorAscending(max);
917 <                return result < min ? -1 : result;
917 >                return (result < min) ? -1 : result;
918              }
919          }
920          ReferenceSet rs = new ReferenceSet();
# Line 975 | Line 975 | public class TreeSetTest extends JSR166T
975      }
976  
977      static boolean eq(Integer i, int j) {
978 <        return i == null ? j == -1 : i == j;
978 >        return (i == null) ? j == -1 : i == j;
979      }
980  
981   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines