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

Comparing jsr166/src/test/tck/AtomicReferenceFieldUpdaterTest.java (file contents):
Revision 1.36 by jsr166, Wed Sep 20 00:41:13 2017 UTC vs.
Revision 1.37 by jsr166, Wed Sep 20 00:59:17 2017 UTC

# Line 119 | Line 119 | public class AtomicReferenceFieldUpdater
119      }
120  
121      /**
122 <     * compareAndSet succeeds in changing value if equal to expected else fails
122 >     * compareAndSet succeeds in changing value if same as expected else fails
123       */
124      public void testCompareAndSet() {
125          AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest, Integer> a;
# Line 135 | Line 135 | public class AtomicReferenceFieldUpdater
135      }
136  
137      /**
138 +     * compareAndSet succeeds in changing protected field value if
139 +     * same as expected else fails
140 +     */
141 +    public void testCompareAndSetProtectedInSubclass() {
142 +        new NonNestmates.AtomicReferenceFieldUpdaterTestSubclass()
143 +            .checkCompareAndSetProtectedSub();
144 +    }
145 +
146 +    /**
147       * compareAndSet in one thread enables another waiting for value
148       * to succeed
149       */
# Line 157 | Line 166 | public class AtomicReferenceFieldUpdater
166      }
167  
168      /**
169 <     * repeated weakCompareAndSet succeeds in changing value when equal
161 <     * to expected
169 >     * repeated weakCompareAndSet succeeds in changing value when same as expected
170       */
171      public void testWeakCompareAndSet() {
172          AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest, Integer> a;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines