103 |
|
} |
104 |
|
|
105 |
|
/** |
106 |
< |
* Constructor throws IAE if capacity argument nonpositive |
106 |
> |
* Constructor throws IllegalArgumentException if capacity argument nonpositive |
107 |
|
*/ |
108 |
|
public void testConstructor_nonPositiveCapacity() { |
109 |
|
for (int i : new int[] { 0, -1, Integer.MIN_VALUE }) { |
156 |
|
} |
157 |
|
|
158 |
|
/** |
159 |
< |
* Initializing from too large collection throws IAE |
159 |
> |
* Initializing from too large collection throws IllegalArgumentException |
160 |
|
*/ |
161 |
|
public void testConstructor_collectionTooLarge() { |
162 |
|
// just barely fits - succeeds |
227 |
|
} |
228 |
|
|
229 |
|
/** |
230 |
< |
* add succeeds if not full; throws ISE if full |
230 |
> |
* add succeeds if not full; throws IllegalStateException if full |
231 |
|
*/ |
232 |
|
public void testAdd() { |
233 |
|
ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE); |
240 |
|
} |
241 |
|
|
242 |
|
/** |
243 |
< |
* addAll(this) throws IAE |
243 |
> |
* addAll(this) throws IllegalArgumentException |
244 |
|
*/ |
245 |
|
public void testAddAllSelf() { |
246 |
|
ArrayBlockingQueue q = populatedQueue(SIZE); |
266 |
|
} |
267 |
|
|
268 |
|
/** |
269 |
< |
* addAll throws ISE if not enough room |
269 |
> |
* addAll throws IllegalStateException if not enough room |
270 |
|
*/ |
271 |
|
public void testAddAll_insufficientSpace() { |
272 |
|
int size = ThreadLocalRandom.current().nextInt(1, SIZE); |