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

Comparing jsr166/src/test/tck/ConcurrentSkipListSubSetTest.java (file contents):
Revision 1.5 by jsr166, Mon Nov 2 20:28:31 2009 UTC vs.
Revision 1.6 by jsr166, Mon Nov 16 04:57:10 2009 UTC

# Line 35 | Line 35 | public class ConcurrentSkipListSubSetTes
35          ConcurrentSkipListSet q = new ConcurrentSkipListSet();
36          assertTrue(q.isEmpty());
37  
38 <        for(int i = n-1; i >= 0; i-=2)
38 >        for (int i = n-1; i >= 0; i-=2)
39              assertTrue(q.add(new Integer(i)));
40 <        for(int i = (n & 1); i < n; i+=2)
40 >        for (int i = (n & 1); i < n; i+=2)
41              assertTrue(q.add(new Integer(i)));
42          assertTrue(q.add(new Integer(-n)));
43          assertTrue(q.add(new Integer(n)));
# Line 169 | Line 169 | public class ConcurrentSkipListSubSetTes
169              q.add(new Object());
170              shouldThrow();
171          }
172 <        catch(ClassCastException success) {}
172 >        catch (ClassCastException success) {}
173      }
174  
175  
# Line 416 | Line 416 | public class ConcurrentSkipListSubSetTes
416          NavigableSet q = populatedSet(SIZE);
417          Object[] o = q.toArray();
418          Arrays.sort(o);
419 <        for(int i = 0; i < o.length; i++)
419 >        for (int i = 0; i < o.length; i++)
420              assertEquals(o[i], q.pollFirst());
421      }
422  
# Line 428 | Line 428 | public class ConcurrentSkipListSubSetTes
428          Integer[] ints = new Integer[SIZE];
429          ints = (Integer[])q.toArray(ints);
430          Arrays.sort(ints);
431 <        for(int i = 0; i < ints.length; i++)
431 >        for (int i = 0; i < ints.length; i++)
432              assertEquals(ints[i], q.pollFirst());
433      }
434  
# Line 439 | Line 439 | public class ConcurrentSkipListSubSetTes
439          NavigableSet q = populatedSet(SIZE);
440          int i = 0;
441          Iterator it = q.iterator();
442 <        while(it.hasNext()) {
442 >        while (it.hasNext()) {
443              assertTrue(q.contains(it.next()));
444              ++i;
445          }
# Line 453 | Line 453 | public class ConcurrentSkipListSubSetTes
453          NavigableSet q = set0();
454          int i = 0;
455          Iterator it = q.iterator();
456 <        while(it.hasNext()) {
456 >        while (it.hasNext()) {
457              assertTrue(q.contains(it.next()));
458              ++i;
459          }
# Line 508 | Line 508 | public class ConcurrentSkipListSubSetTes
508              assertEquals(q.size(), r.size());
509              while (!q.isEmpty())
510                  assertEquals(q.pollFirst(), r.pollFirst());
511 <        } catch(Exception e){
511 >        } catch (Exception e){
512              e.printStackTrace();
513              unexpectedException();
514          }
# Line 687 | Line 687 | public class ConcurrentSkipListSubSetTes
687              q.add(new Object());
688              shouldThrow();
689          }
690 <        catch(ClassCastException success) {}
690 >        catch (ClassCastException success) {}
691      }
692  
693  
# Line 934 | Line 934 | public class ConcurrentSkipListSubSetTes
934          NavigableSet q = populatedSet(SIZE);
935          Object[] o = q.toArray();
936          Arrays.sort(o);
937 <        for(int i = 0; i < o.length; i++)
937 >        for (int i = 0; i < o.length; i++)
938              assertEquals(o[i], q.pollFirst());
939      }
940  
# Line 946 | Line 946 | public class ConcurrentSkipListSubSetTes
946          Integer[] ints = new Integer[SIZE];
947          ints = (Integer[])q.toArray(ints);
948          Arrays.sort(ints);
949 <        for(int i = 0; i < ints.length; i++)
949 >        for (int i = 0; i < ints.length; i++)
950              assertEquals(ints[i], q.pollFirst());
951      }
952  
# Line 957 | Line 957 | public class ConcurrentSkipListSubSetTes
957          NavigableSet q = populatedSet(SIZE);
958          int i = 0;
959          Iterator it = q.iterator();
960 <        while(it.hasNext()) {
960 >        while (it.hasNext()) {
961              assertTrue(q.contains(it.next()));
962              ++i;
963          }
# Line 971 | Line 971 | public class ConcurrentSkipListSubSetTes
971          NavigableSet q = dset0();
972          int i = 0;
973          Iterator it = q.iterator();
974 <        while(it.hasNext()) {
974 >        while (it.hasNext()) {
975              assertTrue(q.contains(it.next()));
976              ++i;
977          }
# Line 1026 | Line 1026 | public class ConcurrentSkipListSubSetTes
1026              assertEquals(q.size(), r.size());
1027              while (!q.isEmpty())
1028                  assertEquals(q.pollFirst(), r.pollFirst());
1029 <        } catch(Exception e){
1029 >        } catch (Exception e){
1030              e.printStackTrace();
1031              unexpectedException();
1032          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines