[cvs] / jsr166 / src / test / tck / AtomicIntegerArrayTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AtomicIntegerArrayTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29, Wed Dec 31 19:05:42 2014 UTC revision 1.30, Wed Dec 31 19:21:20 2014 UTC
# Line 164  Line 164 
164          AtomicIntegerArray aa = new AtomicIntegerArray(SIZE);          AtomicIntegerArray aa = new AtomicIntegerArray(SIZE);
165          for (int i = 0; i < SIZE; i++) {          for (int i = 0; i < SIZE; i++) {
166              aa.set(i, 1);              aa.set(i, 1);
167              while (!aa.weakCompareAndSet(i, 1, 2));              do {} while (!aa.weakCompareAndSet(i, 1, 2));
168              while (!aa.weakCompareAndSet(i, 2, -4));              do {} while (!aa.weakCompareAndSet(i, 2, -4));
169              assertEquals(-4, aa.get(i));              assertEquals(-4, aa.get(i));
170              while (!aa.weakCompareAndSet(i, -4, 7));              do {} while (!aa.weakCompareAndSet(i, -4, 7));
171              assertEquals(7, aa.get(i));              assertEquals(7, aa.get(i));
172          }          }
173      }      }

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8