1 |
|
/* |
2 |
|
* Written by Josh Bloch and Doug Lea with assistance from members of |
3 |
|
* JCP JSR-166 Expert Group and released to the public domain, as |
4 |
< |
* explained at http://creativecommons.org/licenses/publicdomain |
4 |
> |
* explained at http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
import java.util.*; |
278 |
|
|
279 |
|
int preSize = s.size(); |
280 |
|
if (!s.add(e)) |
281 |
< |
fail ("Add failed."); |
281 |
> |
fail("Add failed."); |
282 |
|
int postSize = s.size(); |
283 |
|
if (postSize-preSize != 1) |
284 |
< |
fail ("Add didn't increase size by 1."); |
284 |
> |
fail("Add didn't increase size by 1."); |
285 |
|
} |
286 |
|
} |
287 |
|
|