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))); |
169 |
|
q.add(new Object()); |
170 |
|
shouldThrow(); |
171 |
|
} |
172 |
< |
catch(ClassCastException success) {} |
172 |
> |
catch (ClassCastException success) {} |
173 |
|
} |
174 |
|
|
175 |
|
|
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 |
|
|
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 |
|
|
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 |
|
} |
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 |
|
} |
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 |
|
} |
687 |
|
q.add(new Object()); |
688 |
|
shouldThrow(); |
689 |
|
} |
690 |
< |
catch(ClassCastException success) {} |
690 |
> |
catch (ClassCastException success) {} |
691 |
|
} |
692 |
|
|
693 |
|
|
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 |
|
|
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 |
|
|
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 |
|
} |
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 |
|
} |
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 |
|
} |