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

Comparing jsr166/src/test/tck/LinkedTransferQueueTest.java (file contents):
Revision 1.42 by jsr166, Thu Nov 18 20:21:53 2010 UTC vs.
Revision 1.43 by jsr166, Sun Nov 28 08:43:53 2010 UTC

# Line 40 | Line 40 | public class LinkedTransferQueueTest ext
40                              new Generic().testSuite());
41      }
42  
43    void checkEmpty(BlockingQueue q) {
44        try {
45            assertTrue(q.isEmpty());
46            assertEquals(0, q.size());
47            assertNull(q.peek());
48            assertNull(q.poll());
49            assertNull(q.poll(0, MILLISECONDS));
50            assertEquals(q.toString(), "[]");
51            assertTrue(Arrays.equals(q.toArray(), new Object[0]));
52            assertFalse(q.iterator().hasNext());
53            try {
54                q.element();
55                shouldThrow();
56            } catch (NoSuchElementException success) {}
57            try {
58                q.iterator().next();
59                shouldThrow();
60            } catch (NoSuchElementException success) {}
61            try {
62                q.remove();
63                shouldThrow();
64            } catch (NoSuchElementException success) {}
65        } catch (InterruptedException ie) {
66            threadUnexpectedException(ie);
67        }
68    }
69
43      /**
44       * Constructor builds new queue with size being zero and empty
45       * being true

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines