7 |
|
import java.util.concurrent.*; |
8 |
|
import java.util.*; |
9 |
|
|
10 |
– |
|
10 |
|
public class ThreadLocalRandomTest extends JSR166TestCase { |
11 |
|
|
12 |
|
public static void main(String[] args) { |
66 |
|
assertTrue(i < NCALLS); |
67 |
|
} |
68 |
|
|
70 |
– |
|
69 |
|
/** |
70 |
|
* Repeated calls to nextBoolean produce at least one different result |
71 |
|
*/ |
110 |
|
assertTrue(i < NCALLS); |
111 |
|
} |
112 |
|
|
115 |
– |
|
113 |
|
/** |
114 |
|
* nextInt(negative) throws IllegalArgumentException; |
115 |
|
*/ |
130 |
|
} catch (IllegalArgumentException success) {} |
131 |
|
} |
132 |
|
|
136 |
– |
|
133 |
|
/** |
134 |
|
* nextInt(bound) returns 0 <= value < bound; |
135 |
|
* repeated calls produce at least one different result |
150 |
|
} |
151 |
|
} |
152 |
|
|
157 |
– |
|
153 |
|
/** |
154 |
|
* nextInt(least, bound) returns least <= value < bound; |
155 |
|
* repeated calls produce at least one different result |
231 |
|
} |
232 |
|
} |
233 |
|
|
239 |
– |
|
234 |
|
/** |
235 |
|
* nextDouble(least, bound) returns least <= value < bound; |
236 |
|
* repeated calls produce at least one different result |
252 |
|
} |
253 |
|
} |
254 |
|
|
261 |
– |
|
255 |
|
} |