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

Comparing jsr166/src/test/tck/AtomicLongFieldUpdaterTest.java (file contents):
Revision 1.15 by jsr166, Sat Nov 21 02:07:26 2009 UTC vs.
Revision 1.18 by jsr166, Sat Oct 9 19:30:34 2010 UTC

# Line 31 | Line 31 | public class AtomicLongFieldUpdaterTest
31                  a = AtomicLongFieldUpdater.newUpdater
32                  (AtomicLongFieldUpdaterTest.class, "y");
33              shouldThrow();
34 <        }
35 <        catch (RuntimeException rt) {}
34 >        } catch (RuntimeException success) {}
35      }
36  
37      /**
# Line 44 | Line 43 | public class AtomicLongFieldUpdaterTest
43                  a = AtomicLongFieldUpdater.newUpdater
44                  (AtomicLongFieldUpdaterTest.class, "z");
45              shouldThrow();
46 <        }
48 <        catch (RuntimeException rt) {}
46 >        } catch (RuntimeException success) {}
47      }
48  
49      /**
# Line 57 | Line 55 | public class AtomicLongFieldUpdaterTest
55                  a = AtomicLongFieldUpdater.newUpdater
56                  (AtomicLongFieldUpdaterTest.class, "w");
57              shouldThrow();
58 <        }
61 <
62 <        catch (RuntimeException rt) {}
58 >        } catch (RuntimeException success) {}
59      }
60  
61      /**
62 <     *  get returns the last value set or assigned
62 >     * get returns the last value set or assigned
63       */
64      public void testGetSet() {
65          AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a;
# Line 81 | Line 77 | public class AtomicLongFieldUpdaterTest
77      }
78  
79      /**
80 <     *  get returns the last value lazySet by same thread
80 >     * get returns the last value lazySet by same thread
81       */
82      public void testGetLazySet() {
83          AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a;
# Line 114 | Line 110 | public class AtomicLongFieldUpdaterTest
110          assertTrue(a.compareAndSet(this,2,-4));
111          assertEquals(-4,a.get(this));
112          assertFalse(a.compareAndSet(this,-5,7));
113 <        assertFalse((7 == a.get(this)));
113 >        assertEquals(-4,a.get(this));
114          assertTrue(a.compareAndSet(this,-4,7));
115          assertEquals(7,a.get(this));
116      }
# Line 166 | Line 162 | public class AtomicLongFieldUpdaterTest
162      }
163  
164      /**
165 <     *  getAndSet returns previous value and sets to given value
165 >     * getAndSet returns previous value and sets to given value
166       */
167      public void testGetAndSet() {
168          AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a;
# Line 252 | Line 248 | public class AtomicLongFieldUpdaterTest
248      }
249  
250      /**
251 <     *  decrementAndGet decrements and returns current value
251 >     * decrementAndGet decrements and returns current value
252       */
253      public void testDecrementAndGet() {
254          AtomicLongFieldUpdater<AtomicLongFieldUpdaterTest> a;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines