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

Comparing jsr166/src/test/tck/LinkedListTest.java (file contents):
Revision 1.16 by jsr166, Sun Nov 22 18:57:17 2009 UTC vs.
Revision 1.19 by jsr166, Wed Aug 25 00:07:03 2010 UTC

# Line 12 | Line 12 | import java.util.concurrent.*;
12  
13   public class LinkedListTest 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 353 | Line 353 | public class LinkedListTest extends JSR1
353      }
354  
355      /**
356 <     * toArray with incompatable aray type throws CCE
356 >     * toArray with incompatible array type throws CCE
357       */
358      public void testToArray1_BadArg() {
359          LinkedList l = new LinkedList();
# Line 397 | Line 397 | public class LinkedListTest extends JSR1
397      /**
398       * iterator.remove removes current element
399       */
400 <    public void testIteratorRemove () {
400 >    public void testIteratorRemove() {
401          final LinkedList q = new LinkedList();
402          q.add(new Integer(1));
403          q.add(new Integer(2));
# Line 449 | Line 449 | public class LinkedListTest extends JSR1
449      /**
450       * descendingIterator.remove removes current element
451       */
452 <    public void testDescendingIteratorRemove () {
452 >    public void testDescendingIteratorRemove() {
453          final LinkedList q = new LinkedList();
454 <        q.add(new Integer(3));
455 <        q.add(new Integer(2));
456 <        q.add(new Integer(1));
454 >        q.add(three);
455 >        q.add(two);
456 >        q.add(one);
457          Iterator it = q.descendingIterator();
458          it.next();
459          it.remove();
460          it = q.descendingIterator();
461 <        assertEquals(it.next(), 2);
462 <        assertEquals(it.next(), 3);
461 >        assertSame(it.next(), two);
462 >        assertSame(it.next(), three);
463          assertFalse(it.hasNext());
464      }
465  
# Line 481 | Line 481 | public class LinkedListTest extends JSR1
481      public void testAddFirst() {
482          LinkedList q = populatedQueue(3);
483          q.addFirst(four);
484 <        assertEquals(four,q.peek());
484 >        assertSame(four, q.peek());
485      }
486  
487      /**
# Line 489 | Line 489 | public class LinkedListTest extends JSR1
489       */
490      public void testPush() {
491          LinkedList q = populatedQueue(3);
492        q.pollLast();
492          q.push(four);
493 <        assertEquals(four,q.peekFirst());
493 >        assertSame(four, q.peekFirst());
494      }
495  
496      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines