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

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

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

revision 1.38, Sun May 24 01:42:14 2015 UTC revision 1.39, Mon Oct 10 14:18:06 2016 UTC
# Line 530  Line 530 
530       */       */
531      public void testRemoveFirstOccurrence() {      public void testRemoveFirstOccurrence() {
532          ArrayDeque q = populatedDeque(SIZE);          ArrayDeque q = populatedDeque(SIZE);
533            assertFalse(q.removeFirstOccurrence(null));
534          for (int i = 1; i < SIZE; i += 2) {          for (int i = 1; i < SIZE; i += 2) {
535              assertTrue(q.removeFirstOccurrence(new Integer(i)));              assertTrue(q.removeFirstOccurrence(new Integer(i)));
536          }          }
# Line 538  Line 539 
539              assertFalse(q.removeFirstOccurrence(new Integer(i + 1)));              assertFalse(q.removeFirstOccurrence(new Integer(i + 1)));
540          }          }
541          assertTrue(q.isEmpty());          assertTrue(q.isEmpty());
542            assertFalse(q.removeFirstOccurrence(null));
543            assertFalse(q.removeFirstOccurrence(42));
544            q = new ArrayDeque();
545            assertFalse(q.removeFirstOccurrence(null));
546            assertFalse(q.removeFirstOccurrence(42));
547      }      }
548    
549      /**      /**
# Line 545  Line 551 
551       */       */
552      public void testRemoveLastOccurrence() {      public void testRemoveLastOccurrence() {
553          ArrayDeque q = populatedDeque(SIZE);          ArrayDeque q = populatedDeque(SIZE);
554            assertFalse(q.removeLastOccurrence(null));
555          for (int i = 1; i < SIZE; i += 2) {          for (int i = 1; i < SIZE; i += 2) {
556              assertTrue(q.removeLastOccurrence(new Integer(i)));              assertTrue(q.removeLastOccurrence(new Integer(i)));
557          }          }
# Line 553  Line 560 
560              assertFalse(q.removeLastOccurrence(new Integer(i + 1)));              assertFalse(q.removeLastOccurrence(new Integer(i + 1)));
561          }          }
562          assertTrue(q.isEmpty());          assertTrue(q.isEmpty());
563            assertFalse(q.removeLastOccurrence(null));
564            assertFalse(q.removeLastOccurrence(42));
565            q = new ArrayDeque();
566            assertFalse(q.removeLastOccurrence(null));
567            assertFalse(q.removeLastOccurrence(42));
568      }      }
569    
570      /**      /**

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8