14 |
|
public class ThreadLocalRandom8Test extends JSR166TestCase { |
15 |
|
|
16 |
|
public static void main(String[] args) { |
17 |
< |
junit.textui.TestRunner.run(suite()); |
17 |
> |
main(suite(), args); |
18 |
|
} |
19 |
|
public static Test suite() { |
20 |
|
return new TestSuite(ThreadLocalRandom8Test.class); |
232 |
|
assertEquals(size, counter.sum()); |
233 |
|
} |
234 |
|
|
235 |
+ |
/** |
236 |
+ |
* A deserialized ThreadLocalRandom is always identical to |
237 |
+ |
* ThreadLocalRandom.current() |
238 |
+ |
*/ |
239 |
+ |
public void testSerialization() { |
240 |
+ |
assertSame(ThreadLocalRandom.current(), |
241 |
+ |
serialClone(ThreadLocalRandom.current())); |
242 |
+ |
} |
243 |
+ |
|
244 |
|
} |