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

Comparing jsr166/src/test/tck/LinkedBlockingQueueTest.java (file contents):
Revision 1.24 by jsr166, Tue Dec 1 06:03:49 2009 UTC vs.
Revision 1.27 by jsr166, Wed Aug 25 01:44:48 2010 UTC

# Line 15 | Line 15 | import java.io.*;
15   public class LinkedBlockingQueueTest extends JSR166TestCase {
16  
17      public static void main(String[] args) {
18 <        junit.textui.TestRunner.run (suite());
18 >        junit.textui.TestRunner.run(suite());
19      }
20  
21      public static Test suite() {
# Line 214 | Line 214 | public class LinkedBlockingQueueTest ext
214              shouldThrow();
215          } catch (NullPointerException success) {}
216      }
217 +
218      /**
219       * addAll of a collection with any null elements throws NPE after
220       * possibly adding some elements
# Line 228 | Line 229 | public class LinkedBlockingQueueTest ext
229              shouldThrow();
230          } catch (NullPointerException success) {}
231      }
232 +
233      /**
234       * addAll throws ISE if not enough room
235       */
# Line 241 | Line 243 | public class LinkedBlockingQueueTest ext
243              shouldThrow();
244          } catch (IllegalStateException success) {}
245      }
246 +
247      /**
248       * Queue contains all elements, in traversal order, of successful addAll
249       */
# Line 686 | Line 689 | public class LinkedBlockingQueueTest ext
689      /**
690       * iterator.remove removes current element
691       */
692 <    public void testIteratorRemove () {
692 >    public void testIteratorRemove() {
693          final LinkedBlockingQueue q = new LinkedBlockingQueue(3);
694          q.add(two);
695          q.add(one);
# Line 697 | Line 700 | public class LinkedBlockingQueueTest ext
700          it.remove();
701  
702          it = q.iterator();
703 <        assertEquals(it.next(), one);
704 <        assertEquals(it.next(), three);
703 >        assertSame(it.next(), one);
704 >        assertSame(it.next(), three);
705          assertFalse(it.hasNext());
706      }
707  
# Line 722 | Line 725 | public class LinkedBlockingQueueTest ext
725      /**
726       * Modifications do not cause iterators to fail
727       */
728 <    public void testWeaklyConsistentIteration () {
728 >    public void testWeaklyConsistentIteration() {
729          final LinkedBlockingQueue q = new LinkedBlockingQueue(3);
730          q.add(one);
731          q.add(two);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines