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

Comparing jsr166/src/test/tck/AtomicIntegerArrayTest.java (file contents):
Revision 1.16 by jsr166, Tue Dec 1 09:56:28 2009 UTC vs.
Revision 1.18 by jsr166, Thu Sep 16 00:52:49 2010 UTC

# Line 13 | Line 13 | import java.util.*;
13  
14   public class AtomicIntegerArrayTest extends JSR166TestCase {
15  
16 <    public static void main (String[] args) {
17 <        junit.textui.TestRunner.run (suite());
16 >    public static void main(String[] args) {
17 >        junit.textui.TestRunner.run(suite());
18      }
19      public static Test suite() {
20          return new TestSuite(AtomicIntegerArrayTest.class);
# Line 266 | Line 266 | public class AtomicIntegerArrayTest exte
266  
267      static final int COUNTDOWN = 100000;
268  
269 <    class Counter implements Runnable {
269 >    class Counter extends CheckedRunnable {
270          final AtomicIntegerArray ai;
271          volatile int counts;
272          Counter(AtomicIntegerArray a) { ai = a; }
273 <        public void run() {
273 >        public void realRun() {
274              for (;;) {
275                  boolean done = true;
276                  for (int i = 0; i < ai.length(); ++i) {
277                      int v = ai.get(i);
278 <                    threadAssertTrue(v >= 0);
278 >                    assertTrue(v >= 0);
279                      if (v != 0) {
280                          done = false;
281                          if (ai.compareAndSet(i, v, v-1))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines