13 |
import java.util.NoSuchElementException; |
import java.util.NoSuchElementException; |
14 |
|
|
15 |
import junit.framework.Test; |
import junit.framework.Test; |
|
import junit.framework.TestSuite; |
|
16 |
|
|
17 |
public class LinkedListTest extends JSR166TestCase { |
public class LinkedListTest extends JSR166TestCase { |
18 |
public static void main(String[] args) { |
public static void main(String[] args) { |
42 |
* Returns a new queue of given size containing consecutive |
* Returns a new queue of given size containing consecutive |
43 |
* Integers 0 ... n - 1. |
* Integers 0 ... n - 1. |
44 |
*/ |
*/ |
45 |
private LinkedList<Integer> populatedQueue(int n) { |
private static LinkedList<Integer> populatedQueue(int n) { |
46 |
LinkedList<Integer> q = new LinkedList<>(); |
LinkedList<Integer> q = new LinkedList<>(); |
47 |
assertTrue(q.isEmpty()); |
assertTrue(q.isEmpty()); |
48 |
for (int i = 0; i < n; ++i) |
for (int i = 0; i < n; ++i) |