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

Comparing jsr166/src/test/tck/AtomicLongTest.java (file contents):
Revision 1.23 by jsr166, Fri Jun 10 20:01:21 2011 UTC vs.
Revision 1.27 by jsr166, Wed Dec 31 19:05:42 2014 UTC

# Line 6 | Line 6
6   * Pat Fisher, Mike Judd.
7   */
8  
9 import junit.framework.*;
9   import java.util.concurrent.atomic.AtomicLong;
10  
11 + import junit.framework.Test;
12 + import junit.framework.TestSuite;
13 +
14   public class AtomicLongTest extends JSR166TestCase {
15      public static void main(String[] args) {
16          junit.textui.TestRunner.run(suite());
# Line 196 | Line 198 | public class AtomicLongTest extends JSR1
198      public void testSerialization() throws Exception {
199          AtomicLong x = new AtomicLong();
200          AtomicLong y = serialClone(x);
201 <        assertTrue(x != y);
201 >        assertNotSame(x, y);
202          x.set(-22);
203          AtomicLong z = serialClone(x);
204 +        assertNotSame(y, z);
205          assertEquals(-22, x.get());
206          assertEquals(0, y.get());
207          assertEquals(-22, z.get());
# Line 210 | Line 213 | public class AtomicLongTest extends JSR1
213      public void testToString() {
214          AtomicLong ai = new AtomicLong();
215          assertEquals("0", ai.toString());
216 <        for (long i : VALUES) {
217 <            ai.set(i);
218 <            assertEquals(ai.toString(), Long.toString(i));
216 >        for (long x : VALUES) {
217 >            ai.set(x);
218 >            assertEquals(Long.toString(x), ai.toString());
219          }
220      }
221  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines