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

Comparing jsr166/src/test/tck/AtomicReferenceTest.java (file contents):
Revision 1.19 by jsr166, Fri Jun 10 20:01:21 2011 UTC vs.
Revision 1.21 by jsr166, Thu May 30 03:28:55 2013 UTC

# Line 87 | Line 87 | public class AtomicReferenceTest extends
87          assertTrue(ai.compareAndSet(one, two));
88          t.join(LONG_DELAY_MS);
89          assertFalse(t.isAlive());
90 <        assertSame(ai.get(), three);
90 >        assertSame(three, ai.get());
91      }
92  
93      /**
# Line 119 | Line 119 | public class AtomicReferenceTest extends
119      public void testSerialization() throws Exception {
120          AtomicReference x = new AtomicReference();
121          AtomicReference y = serialClone(x);
122 <        assertTrue(x != y);
122 >        assertNotSame(x, y);
123          x.set(one);
124          AtomicReference z = serialClone(x);
125 +        assertNotSame(y, z);
126          assertEquals(one, x.get());
127          assertEquals(null, y.get());
128          assertEquals(one, z.get());
# Line 132 | Line 133 | public class AtomicReferenceTest extends
133       */
134      public void testToString() {
135          AtomicReference<Integer> ai = new AtomicReference<Integer>(one);
136 <        assertEquals(ai.toString(), one.toString());
136 >        assertEquals(one.toString(), ai.toString());
137          ai.set(two);
138 <        assertEquals(ai.toString(), two.toString());
138 >        assertEquals(two.toString(), ai.toString());
139      }
140  
141   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines