--- jsr166/src/test/tck/AtomicLongTest.java 2003/09/25 11:02:41 1.5 +++ jsr166/src/test/tck/AtomicLongTest.java 2004/01/09 20:07:36 1.8 @@ -1,8 +1,9 @@ /* - * Written by members of JCP JSR-166 Expert Group and released to the - * public domain. Use, modify, and redistribute this code in any way - * without acknowledgement. Other contributors include Andrew Wright, - * Jeffrey Hayes, Pat Fischer, Mike Judd. + * Written by Doug Lea with assistance from members of JCP JSR-166 + * Expert Group and released to the public domain, as explained at + * http://creativecommons.org/licenses/publicdomain + * Other contributors include Andrew Wright, Jeffrey Hayes, + * Pat Fisher, Mike Judd. */ import junit.framework.*; @@ -26,7 +27,7 @@ public class AtomicLongTest extends JSR1 } /** - * default constructed intializes to zero + * default constructed initializes to zero */ public void testConstructor2(){ AtomicLong ai = new AtomicLong(); @@ -197,4 +198,14 @@ public class AtomicLongTest extends JSR1 } } + /** + * toString returns current value. + */ + public void testToString() { + AtomicLong ai = new AtomicLong(); + for (long i = -12; i < 6; ++i) { + ai.set(i); + assertEquals(ai.toString(), Long.toString(i)); + } + } }