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

Comparing jsr166/src/test/tck/ThreadLocalRandomTest.java (file contents):
Revision 1.3 by jsr166, Tue Aug 4 10:04:47 2009 UTC vs.
Revision 1.8 by jsr166, Tue Mar 15 19:47:07 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6   import junit.framework.*;
7   import java.util.concurrent.*;
# Line 11 | Line 11 | import java.util.*;
11   public class ThreadLocalRandomTest extends JSR166TestCase {
12  
13      public static void main(String[] args) {
14 <        junit.textui.TestRunner.run (suite());
14 >        junit.textui.TestRunner.run(suite());
15      }
16      public static Test suite() {
17 <        return new TestSuite(ThreadLocalRandomTest.class);
17 >        return new TestSuite(ThreadLocalRandomTest.class);
18      }
19  
20      /**
# Line 42 | Line 42 | public class ThreadLocalRandomTest exten
42          try {
43              ThreadLocalRandom.current().setSeed(17);
44              shouldThrow();
45 <        } catch (UnsupportedOperationException success) {
46 <        }
45 >        } catch (UnsupportedOperationException success) {}
46      }
47  
48      /**
# Line 119 | Line 118 | public class ThreadLocalRandomTest exten
118       */
119      public void testNextIntBoundedNeg() {
120          try {
121 <            int  f = ThreadLocalRandom.current().nextInt(-17);
121 >            int f = ThreadLocalRandom.current().nextInt(-17);
122              shouldThrow();
123 <        } catch (IllegalArgumentException success) {
125 <        }
123 >        } catch (IllegalArgumentException success) {}
124      }
125  
126      /**
# Line 130 | Line 128 | public class ThreadLocalRandomTest exten
128       */
129      public void testNextIntBadBounds() {
130          try {
131 <            int  f = ThreadLocalRandom.current().nextInt(17, 2);
131 >            int f = ThreadLocalRandom.current().nextInt(17, 2);
132              shouldThrow();
133 <        } catch (IllegalArgumentException success) {
136 <        }
133 >        } catch (IllegalArgumentException success) {}
134      }
135  
136  
# Line 184 | Line 181 | public class ThreadLocalRandomTest exten
181       */
182      public void testNextLongBoundedNeg() {
183          try {
184 <            long  f = ThreadLocalRandom.current().nextLong(-17);
184 >            long f = ThreadLocalRandom.current().nextLong(-17);
185              shouldThrow();
186 <        } catch (IllegalArgumentException success) {
190 <        }
186 >        } catch (IllegalArgumentException success) {}
187      }
188  
189      /**
# Line 195 | Line 191 | public class ThreadLocalRandomTest exten
191       */
192      public void testNextLongBadBounds() {
193          try {
194 <            long  f = ThreadLocalRandom.current().nextLong(17, 2);
194 >            long f = ThreadLocalRandom.current().nextLong(17, 2);
195              shouldThrow();
196 <        } catch (IllegalArgumentException success) {
201 <        }
196 >        } catch (IllegalArgumentException success) {}
197      }
198  
199      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines