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

Comparing jsr166/src/test/tck/ConcurrentSkipListSetTest.java (file contents):
Revision 1.42 by jsr166, Sun May 24 01:42:14 2015 UTC vs.
Revision 1.44 by jsr166, Thu Sep 15 16:43:56 2016 UTC

# Line 199 | Line 199 | public class ConcurrentSkipListSetTest e
199              q.add(new Object());
200              q.add(new Object());
201              shouldThrow();
202 <        } catch (ClassCastException success) {}
202 >        } catch (ClassCastException success) {
203 >            assertTrue(q.size() < 2);
204 >            for (int i = 0, size = q.size(); i < size; i++)
205 >                assertTrue(q.pollFirst().getClass() == Object.class);
206 >            assertNull(q.pollFirst());
207 >            assertTrue(q.isEmpty());
208 >            assertEquals(0, q.size());
209 >        }
210      }
211  
212      /**
# Line 691 | Line 698 | public class ConcurrentSkipListSetTest e
698      }
699  
700      static NavigableSet<Integer> newSet(Class cl) throws Exception {
701 <        NavigableSet<Integer> result = (NavigableSet<Integer>) cl.newInstance();
701 >        NavigableSet<Integer> result =
702 >            (NavigableSet<Integer>) cl.getConstructor().newInstance();
703          assertEquals(0, result.size());
704          assertFalse(result.iterator().hasNext());
705          return result;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines