[cvs] / jsr166 / src / test / tck / ArrayBlockingQueueTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/ArrayBlockingQueueTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.63, Sat Feb 28 18:23:30 2015 UTC revision 1.64, Sat Feb 28 19:59:23 2015 UTC
# Line 159  Line 159 
159       * remainingCapacity decreases on add, increases on remove       * remainingCapacity decreases on add, increases on remove
160       */       */
161      public void testRemainingCapacity() {      public void testRemainingCapacity() {
162          ArrayBlockingQueue q = populatedQueue(SIZE);          BlockingQueue q = populatedQueue(SIZE);
163          for (int i = 0; i < SIZE; ++i) {          for (int i = 0; i < SIZE; ++i) {
164              assertEquals(i, q.remainingCapacity());              assertEquals(i, q.remainingCapacity());
165              assertEquals(SIZE-i, q.size());              assertEquals(SIZE, q.size() + q.remainingCapacity());
166              q.remove();              assertEquals(i, q.remove());
167          }          }
168          for (int i = 0; i < SIZE; ++i) {          for (int i = 0; i < SIZE; ++i) {
169              assertEquals(SIZE-i, q.remainingCapacity());              assertEquals(SIZE-i, q.remainingCapacity());
170              assertEquals(i, q.size());              assertEquals(SIZE, q.size() + q.remainingCapacity());
171              q.add(new Integer(i));              assertTrue(q.add(i));
172          }          }
173      }      }
174    

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8