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

Comparing jsr166/src/test/tck/ConcurrentSkipListMapTest.java (file contents):
Revision 1.8 by dl, Sat Apr 19 18:45:18 2008 UTC vs.
Revision 1.9 by jsr166, Mon Nov 2 20:28:31 2009 UTC

# Line 11 | Line 11 | import java.io.*;
11  
12   public class ConcurrentSkipListMapTest extends JSR166TestCase {
13      public static void main(String[] args) {
14 <        junit.textui.TestRunner.run (suite());  
14 >        junit.textui.TestRunner.run (suite());
15      }
16      public static Test suite() {
17          return new TestSuite(ConcurrentSkipListMapTest.class);
# Line 20 | Line 20 | public class ConcurrentSkipListMapTest e
20      /**
21       * Create a map from Integers 1-5 to Strings "A"-"E".
22       */
23 <    private static ConcurrentSkipListMap map5() {  
23 >    private static ConcurrentSkipListMap map5() {
24          ConcurrentSkipListMap map = new ConcurrentSkipListMap();
25          assertTrue(map.isEmpty());
26          map.put(one, "A");
# Line 43 | Line 43 | public class ConcurrentSkipListMapTest e
43      }
44  
45      /**
46 <     *  
46 >     *
47       */
48      public void testConstructFromSorted() {
49          ConcurrentSkipListMap map = map5();
# Line 276 | Line 276 | public class ConcurrentSkipListMapTest e
276          Iterator it = s.iterator();
277          while (it.hasNext()) {
278              Map.Entry e = (Map.Entry) it.next();
279 <            assertTrue(
279 >            assertTrue(
280                         (e.getKey().equals(one) && e.getValue().equals("A")) ||
281                         (e.getKey().equals(two) && e.getValue().equals("B")) ||
282                         (e.getKey().equals(three) && e.getValue().equals("C")) ||
# Line 295 | Line 295 | public class ConcurrentSkipListMapTest e
295          Iterator it = s.iterator();
296          while (it.hasNext()) {
297              Map.Entry e = (Map.Entry) it.next();
298 <            assertTrue(
298 >            assertTrue(
299                         (e.getKey().equals(one) && e.getValue().equals("A")) ||
300                         (e.getKey().equals(two) && e.getValue().equals("B")) ||
301                         (e.getKey().equals(three) && e.getValue().equals("C")) ||
# Line 691 | Line 691 | public class ConcurrentSkipListMapTest e
691          for (int i = 1; i <= 5; ++i) {
692              assertTrue(s.indexOf(String.valueOf(i)) >= 0);
693          }
694 <    }        
694 >    }
695  
696      // Exception tests
697  
# Line 863 | Line 863 | public class ConcurrentSkipListMapTest e
863          k = (Integer)(r.next());
864          assertEquals(two, k);
865          assertFalse(r.hasNext());
866 <        
866 >
867          Iterator j = sm.keySet().iterator();
868          j.next();
869          j.remove();
# Line 897 | Line 897 | public class ConcurrentSkipListMapTest e
897          k = (Integer)(r.next());
898          assertEquals(two, k);
899          assertFalse(r.hasNext());
900 <        
900 >
901          Iterator j = sm.keySet().iterator();
902          j.next();
903          j.remove();
# Line 1307 | Line 1307 | public class ConcurrentSkipListMapTest e
1307      static boolean eq(Integer i, int j) {
1308          return i == null ? j == -1 : i == j;
1309      }
1310 <    
1310 >
1311   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines