160 |
|
*/ |
161 |
|
public void testNextIntBounded() { |
162 |
|
SplittableRandom sr = new SplittableRandom(); |
163 |
+ |
for (int i = 0; i < 2; i++) assertEquals(0, sr.nextInt(1)); |
164 |
|
// sample bound space across prime number increments |
165 |
|
for (int bound = 2; bound < MAX_INT_BOUND; bound += 524959) { |
166 |
|
int f = sr.nextInt(bound); |
230 |
|
*/ |
231 |
|
public void testNextLongBounded() { |
232 |
|
SplittableRandom sr = new SplittableRandom(); |
233 |
+ |
for (int i = 0; i < 2; i++) assertEquals(0L, sr.nextLong(1L)); |
234 |
|
for (long bound = 2; bound < MAX_LONG_BOUND; bound += 15485863) { |
235 |
|
long f = sr.nextLong(bound); |
236 |
|
assertTrue(0 <= f && f < bound); |