[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.9, Sat Jan 10 01:41:59 2004 UTC revision 1.10, Wed May 25 14:27:37 2005 UTC
# Line 93  Line 93 
93      }      }
94    
95      /**      /**
96         * get returns the last value lazySet at index by same thread
97         */
98        public void testGetLazySet() {
99            AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
100            for (int i = 0; i < SIZE; ++i) {
101                ai.lazySet(i, 1);
102                assertEquals(1,ai.get(i));
103                ai.lazySet(i, 2);
104                assertEquals(2,ai.get(i));
105                ai.lazySet(i, -3);
106                assertEquals(-3,ai.get(i));
107            }
108        }
109    
110        /**
111       * compareAndSet succeeds in changing value if equal to expected else fails       * compareAndSet succeeds in changing value if equal to expected else fails
112       */       */
113      public void testCompareAndSet() {      public void testCompareAndSet() {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8