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.17 by jsr166, Wed Dec 31 21:28:49 2014 UTC vs.
Revision 1.21 by jsr166, Thu Nov 17 22:09:52 2016 UTC

# Line 14 | Line 14 | import junit.framework.TestSuite;
14   public class SplittableRandomTest 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(SplittableRandomTest.class);
# 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