8 |
|
import java.util.ArrayDeque; |
9 |
|
import java.util.Arrays; |
10 |
|
import java.util.Collection; |
11 |
– |
import java.util.Collections; |
11 |
|
import java.util.Deque; |
12 |
|
import java.util.Iterator; |
13 |
|
import java.util.NoSuchElementException; |
16 |
|
import java.util.concurrent.ThreadLocalRandom; |
17 |
|
|
18 |
|
import junit.framework.Test; |
20 |
– |
import junit.framework.TestSuite; |
19 |
|
|
20 |
|
public class ArrayDequeTest extends JSR166TestCase { |
21 |
|
public static void main(String[] args) { |
40 |
|
*/ |
41 |
|
private static ArrayDeque<Integer> populatedDeque(int n) { |
42 |
|
// Randomize various aspects of memory layout, including |
43 |
< |
// filled-to-capacity and wraparound. |
43 |
> |
// capacity slop and wraparound. |
44 |
|
final ArrayDeque<Integer> q; |
45 |
|
ThreadLocalRandom rnd = ThreadLocalRandom.current(); |
46 |
|
switch (rnd.nextInt(6)) { |