ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/SplittableRandomTest.java
(Generate patch)

Comparing jsr166/src/test/tck/SplittableRandomTest.java (file contents):
Revision 1.18 by jsr166, Sat Apr 25 04:55:31 2015 UTC vs.
Revision 1.19 by jsr166, Sun Sep 20 21:16:08 2015 UTC

# Line 160 | Line 160 | public class SplittableRandomTest extend
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);
# Line 229 | Line 230 | public class SplittableRandomTest extend
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines