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

Comparing jsr166/src/test/tck/LinkedBlockingDequeTest.java (file contents):
Revision 1.35 by jsr166, Tue Mar 15 19:47:06 2011 UTC vs.
Revision 1.36 by jsr166, Thu Apr 14 22:55:08 2011 UTC

# Line 772 | Line 772 | public class LinkedBlockingDequeTest ext
772      /**
773       * putFirst(null) throws NPE
774       */
775 <     public void testPutFirstNull() throws InterruptedException {
775 >    public void testPutFirstNull() throws InterruptedException {
776          try {
777              LinkedBlockingDeque q = new LinkedBlockingDeque(SIZE);
778              q.putFirst(null);
779              shouldThrow();
780          } catch (NullPointerException success) {}
781 <     }
781 >    }
782  
783      /**
784       * all elements successfully putFirst are contained
785       */
786 <     public void testPutFirst() throws InterruptedException {
787 <         LinkedBlockingDeque q = new LinkedBlockingDeque(SIZE);
788 <         for (int i = 0; i < SIZE; ++i) {
789 <             Integer I = new Integer(i);
790 <             q.putFirst(I);
791 <             assertTrue(q.contains(I));
792 <         }
793 <         assertEquals(0, q.remainingCapacity());
786 >    public void testPutFirst() throws InterruptedException {
787 >        LinkedBlockingDeque q = new LinkedBlockingDeque(SIZE);
788 >        for (int i = 0; i < SIZE; ++i) {
789 >            Integer I = new Integer(i);
790 >            q.putFirst(I);
791 >            assertTrue(q.contains(I));
792 >        }
793 >        assertEquals(0, q.remainingCapacity());
794      }
795  
796      /**
# Line 985 | Line 985 | public class LinkedBlockingDequeTest ext
985      /**
986       * putLast(null) throws NPE
987       */
988 <     public void testPutLastNull() throws InterruptedException {
988 >    public void testPutLastNull() throws InterruptedException {
989          try {
990              LinkedBlockingDeque q = new LinkedBlockingDeque(SIZE);
991              q.putLast(null);
992              shouldThrow();
993          } catch (NullPointerException success) {}
994 <     }
994 >    }
995  
996      /**
997       * all elements successfully putLast are contained
998       */
999 <     public void testPutLast() throws InterruptedException {
1000 <         LinkedBlockingDeque q = new LinkedBlockingDeque(SIZE);
1001 <         for (int i = 0; i < SIZE; ++i) {
1002 <             Integer I = new Integer(i);
1003 <             q.putLast(I);
1004 <             assertTrue(q.contains(I));
1005 <         }
1006 <         assertEquals(0, q.remainingCapacity());
999 >    public void testPutLast() throws InterruptedException {
1000 >        LinkedBlockingDeque q = new LinkedBlockingDeque(SIZE);
1001 >        for (int i = 0; i < SIZE; ++i) {
1002 >            Integer I = new Integer(i);
1003 >            q.putLast(I);
1004 >            assertTrue(q.contains(I));
1005 >        }
1006 >        assertEquals(0, q.remainingCapacity());
1007      }
1008  
1009      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines