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.25 by jsr166, Thu Nov 18 20:21:53 2010 UTC vs.
Revision 1.28 by jsr166, Tue May 31 16:16:24 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   * Other contributors include Andrew Wright, Jeffrey Hayes,
6   * Pat Fisher, Mike Judd.
7   */
8  
9   import junit.framework.*;
10 < import java.util.*;
11 < import java.util.concurrent.*;
10 > import java.util.Arrays;
11 > import java.util.Collection;
12 > import java.util.Iterator;
13 > import java.util.LinkedList;
14 > import java.util.NoSuchElementException;
15  
16   public class LinkedListTest extends JSR166TestCase {
17      public static void main(String[] args) {
# Line 468 | Line 471 | public class LinkedListTest extends JSR1
471          assertFalse(it.hasNext());
472      }
473  
471
474      /**
475       * toString contains toStrings of elements
476       */
# Line 476 | Line 478 | public class LinkedListTest extends JSR1
478          LinkedList q = populatedQueue(SIZE);
479          String s = q.toString();
480          for (int i = 0; i < SIZE; ++i) {
481 <            assertTrue(s.indexOf(String.valueOf(i)) >= 0);
481 >            assertTrue(s.contains(String.valueOf(i)));
482          }
483      }
484  
# Line 555 | Line 557 | public class LinkedListTest extends JSR1
557          assertNull(q.peekFirst());
558      }
559  
558
560      /**
561       * peekLast returns next element, or null if empty
562       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines