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

Comparing jsr166/src/test/tck/AtomicStampedReferenceTest.java (file contents):
Revision 1.14 by jsr166, Tue Dec 1 09:56:28 2009 UTC vs.
Revision 1.16 by jsr166, Sat Oct 9 19:30:34 2010 UTC

# Line 10 | Line 10 | import junit.framework.*;
10   import java.util.concurrent.atomic.*;
11  
12   public class AtomicStampedReferenceTest extends JSR166TestCase {
13 <    public static void main (String[] args) {
14 <        junit.textui.TestRunner.run (suite());
13 >    public static void main(String[] args) {
14 >        junit.textui.TestRunner.run(suite());
15      }
16      public static Test suite() {
17          return new TestSuite(AtomicStampedReferenceTest.class);
# Line 30 | Line 30 | public class AtomicStampedReferenceTest
30      }
31  
32      /**
33 <     *  get returns the last values of reference and stamp set
33 >     * get returns the last values of reference and stamp set
34       */
35      public void testGetSet() {
36          int[] mark = new int[1];
# Line 52 | Line 52 | public class AtomicStampedReferenceTest
52      }
53  
54      /**
55 <     *  attemptStamp succeeds in single thread
55 >     * attemptStamp succeeds in single thread
56       */
57      public void testAttemptStamp() {
58          int[] mark = new int[1];
# Line 136 | Line 136 | public class AtomicStampedReferenceTest
136          int[] mark = new int[1];
137          AtomicStampedReference ai = new AtomicStampedReference(one, 0);
138          assertSame(one, ai.get(mark));
139 <        assertEquals(0, ai.getStamp ());
139 >        assertEquals(0, ai.getStamp());
140          assertEquals(0, mark[0]);
141  
142          while (!ai.weakCompareAndSet(one, two, 0, 0));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines