59 |
|
* Integers 0 ... n - 1. |
60 |
|
*/ |
61 |
|
private static LinkedBlockingQueue<Integer> populatedQueue(int n) { |
62 |
< |
LinkedBlockingQueue<Integer> q = |
63 |
< |
new LinkedBlockingQueue<Integer>(n); |
62 |
> |
LinkedBlockingQueue<Integer> q = new LinkedBlockingQueue<>(n); |
63 |
|
assertTrue(q.isEmpty()); |
64 |
|
for (int i = 0; i < n; i++) |
65 |
|
assertTrue(q.offer(new Integer(i))); |
795 |
|
} |
796 |
|
|
797 |
|
/** |
798 |
< |
* A deserialized serialized queue has same elements in same order |
798 |
> |
* A deserialized/reserialized queue has same elements in same order |
799 |
|
*/ |
800 |
|
public void testSerialization() throws Exception { |
801 |
|
Queue x = populatedQueue(SIZE); |