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

Comparing jsr166/src/test/tck/AtomicIntegerTest.java (file contents):
Revision 1.9 by dl, Sun Jan 11 01:31:34 2004 UTC vs.
Revision 1.11 by dl, Fri Oct 7 14:58:35 2005 UTC

# Line 46 | Line 46 | public class AtomicIntegerTest extends J
46          assertEquals(-3,ai.get());
47          
48      }
49 +
50 +    /**
51 +     * get returns the last value lazySet in same thread
52 +     */
53 +    public void testGetLazySet(){
54 +        AtomicInteger ai = new AtomicInteger(1);
55 +        assertEquals(1,ai.get());
56 +        ai.lazySet(2);
57 +        assertEquals(2,ai.get());
58 +        ai.lazySet(-3);
59 +        assertEquals(-3,ai.get());
60 +        
61 +    }
62      /**
63       * compareAndSet succeeds in changing value if equal to expected else fails
64       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines