39 |
|
static final int NCALLS = 10000; |
40 |
|
|
41 |
|
// max sampled int bound |
42 |
< |
static final int MAX_INT_BOUND = (1 << 28); |
42 |
> |
static final int MAX_INT_BOUND = (1 << 26); |
43 |
|
|
44 |
|
// max sampled long bound |
45 |
< |
static final long MAX_LONG_BOUND = (1L << 42); |
45 |
> |
static final long MAX_LONG_BOUND = (1L << 40); |
46 |
|
|
47 |
|
// Number of replications for other checks |
48 |
|
static final int REPS = |
89 |
|
* same values for nextLong. |
90 |
|
*/ |
91 |
|
public void testSeedConstructor() { |
92 |
< |
for (long seed = 2; seed < MAX_LONG_BOUND; seed += 15485863) { |
92 |
> |
for (long seed = 2; seed < MAX_LONG_BOUND; seed += 15485863) { |
93 |
|
SplittableRandom sr1 = new SplittableRandom(seed); |
94 |
|
SplittableRandom sr2 = new SplittableRandom(seed); |
95 |
|
for (int i = 0; i < REPS; ++i) |
130 |
|
/** |
131 |
|
* nextInt(non-positive) throws IllegalArgumentException |
132 |
|
*/ |
133 |
< |
public void testNextIntNonPositive() { |
133 |
> |
public void testNextIntBoundNonPositive() { |
134 |
|
SplittableRandom sr = new SplittableRandom(); |
135 |
|
Runnable[] throwingActions = { |
136 |
|
() -> sr.nextInt(-17), |
199 |
|
/** |
200 |
|
* nextLong(non-positive) throws IllegalArgumentException |
201 |
|
*/ |
202 |
< |
public void testNextLongNonPositive() { |
202 |
> |
public void testNextLongBoundNonPositive() { |
203 |
|
SplittableRandom sr = new SplittableRandom(); |
204 |
|
Runnable[] throwingActions = { |
205 |
|
() -> sr.nextLong(-17L), |
267 |
|
/** |
268 |
|
* nextDouble(non-positive) throws IllegalArgumentException |
269 |
|
*/ |
270 |
< |
public void testNextDoubleNonPositive() { |
270 |
> |
public void testNextDoubleBoundNonPositive() { |
271 |
|
SplittableRandom sr = new SplittableRandom(); |
272 |
|
Runnable[] throwingActions = { |
273 |
|
() -> sr.nextDouble(-17.0d), |