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.20 by jsr166, Tue Dec 1 09:56:28 2009 UTC vs.
Revision 1.22 by jsr166, Wed Aug 25 01:44:48 2010 UTC

# Line 12 | Line 12 | import java.io.*;
12  
13   public class LinkedBlockingDequeTest extends JSR166TestCase {
14      public static void main(String[] args) {
15 <        junit.textui.TestRunner.run (suite());
15 >        junit.textui.TestRunner.run(suite());
16      }
17  
18      public static Test suite() {
# Line 157 | Line 157 | public class LinkedBlockingDequeTest ext
157      }
158  
159      /**
160 <     * getFirst returns next getFirst, or throws NSEE if empty
160 >     * getFirst() returns first element, or throws NSEE if empty
161       */
162      public void testFirstElement() {
163          LinkedBlockingDeque q = populatedDeque(SIZE);
# Line 173 | Line 173 | public class LinkedBlockingDequeTest ext
173      }
174  
175      /**
176 <     *  getLast returns next element, or throws NSEE if empty
176 >     *  getLast() returns last element, or throws NSEE if empty
177       */
178      public void testLastElement() {
179          LinkedBlockingDeque q = populatedDeque(SIZE);
# Line 189 | Line 189 | public class LinkedBlockingDequeTest ext
189      }
190  
191      /**
192 <     *  removeFirst removes next element, or throws NSEE if empty
192 >     * removeFirst() removes first element, or throws NSEE if empty
193       */
194      public void testRemoveFirst() {
195          LinkedBlockingDeque q = populatedDeque(SIZE);
# Line 204 | Line 204 | public class LinkedBlockingDequeTest ext
204      }
205  
206      /**
207 <     *  removeLast removes last element, or throws NSEE if empty
207 >     * removeLast() removes last element, or throws NSEE if empty
208       */
209      public void testRemoveLast() {
210          LinkedBlockingDeque q = populatedDeque(SIZE);
# Line 513 | Line 513 | public class LinkedBlockingDequeTest ext
513              shouldThrow();
514          } catch (NullPointerException success) {}
515      }
516 +
517      /**
518       * addAll of a collection with any null elements throws NPE after
519       * possibly adding some elements
# Line 527 | Line 528 | public class LinkedBlockingDequeTest ext
528              shouldThrow();
529          } catch (NullPointerException success) {}
530      }
531 +
532      /**
533       * addAll throws ISE if not enough room
534       */
# Line 1374 | Line 1376 | public class LinkedBlockingDequeTest ext
1376      /**
1377       * iterator.remove removes current element
1378       */
1379 <    public void testIteratorRemove () {
1379 >    public void testIteratorRemove() {
1380          final LinkedBlockingDeque q = new LinkedBlockingDeque(3);
1381          q.add(two);
1382          q.add(one);
# Line 1410 | Line 1412 | public class LinkedBlockingDequeTest ext
1412      /**
1413       * Modifications do not cause iterators to fail
1414       */
1415 <    public void testWeaklyConsistentIteration () {
1415 >    public void testWeaklyConsistentIteration() {
1416          final LinkedBlockingDeque q = new LinkedBlockingDeque(3);
1417          q.add(one);
1418          q.add(two);
# Line 1466 | Line 1468 | public class LinkedBlockingDequeTest ext
1468      /**
1469       * descendingIterator.remove removes current element
1470       */
1471 <    public void testDescendingIteratorRemove () {
1471 >    public void testDescendingIteratorRemove() {
1472          final LinkedBlockingDeque q = new LinkedBlockingDeque();
1473          for (int iters = 0; iters < 100; ++iters) {
1474              q.add(new Integer(3));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines