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

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

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

revision 1.23, Thu Nov 4 01:04:54 2010 UTC revision 1.24, Fri Nov 5 00:17:22 2010 UTC
# Line 23  Line 23 
23       * Create a queue of given size containing consecutive       * Create a queue of given size containing consecutive
24       * Integers 0 ... n.       * Integers 0 ... n.
25       */       */
26      private LinkedList populatedQueue(int n) {      private LinkedList<Integer> populatedQueue(int n) {
27          LinkedList q = new LinkedList();          LinkedList<Integer> q = new LinkedList<Integer>();
28          assertTrue(q.isEmpty());          assertTrue(q.isEmpty());
29          for (int i = 0; i < n; ++i)          for (int i = 0; i < n; ++i)
30              assertTrue(q.offer(new Integer(i)));              assertTrue(q.offer(new Integer(i)));
# Line 331  Line 331 
331       * toArray(a) contains all elements in FIFO order       * toArray(a) contains all elements in FIFO order
332       */       */
333      public void testToArray2() {      public void testToArray2() {
334          LinkedList q = populatedQueue(SIZE);          LinkedList<Integer> q = populatedQueue(SIZE);
335          Integer[] ints = new Integer[SIZE];          Integer[] ints = new Integer[SIZE];
336          assertSame(ints, q.toArray(ints));          Integer[] array = q.toArray(ints);
337            assertSame(ints, array);
338          for (int i = 0; i < ints.length; i++)          for (int i = 0; i < ints.length; i++)
339              assertSame(ints[i], q.poll());              assertSame(ints[i], q.poll());
340      }      }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8