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

Comparing jsr166/src/test/tck/AtomicReferenceArrayTest.java (file contents):
Revision 1.9 by dl, Sat Jan 10 01:41:59 2004 UTC vs.
Revision 1.10 by dl, Wed May 25 14:27:37 2005 UTC

# Line 94 | Line 94 | public class AtomicReferenceArrayTest ex
94      }
95  
96      /**
97 +     * get returns the last value lazySet at index by same thread
98 +     */
99 +    public void testGetLazySet(){
100 +        AtomicReferenceArray ai = new AtomicReferenceArray(SIZE);
101 +        for (int i = 0; i < SIZE; ++i) {
102 +            ai.lazySet(i, one);
103 +            assertEquals(one,ai.get(i));
104 +            ai.lazySet(i, two);
105 +            assertEquals(two,ai.get(i));
106 +            ai.lazySet(i, m3);
107 +            assertEquals(m3,ai.get(i));
108 +        }
109 +    }
110 +
111 +    /**
112       * compareAndSet succeeds in changing value if equal to expected else fails
113       */
114      public void testCompareAndSet(){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines