ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/AtomicBooleanTest.java
Revision: 1.2
Committed: Wed May 28 00:33:17 2003 UTC (21 years ago) by tim
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Emulation classes available by setting build.emulation property.
Dist-docs hides non-JSR166 classes, Random and Unsafe.

File Contents

# Content
1 import java.util.concurrent.atomic.AtomicBoolean;
2 import junit.framework.TestCase;
3
4 /**
5 * Tests the AtomicBoolean implementation.
6 */
7 public class AtomicBooleanTest extends TestCase {
8
9 public void testGetAndSet () {
10 boolean initval = false;
11 AtomicBoolean b = new AtomicBoolean(initval);
12 boolean newval = true;
13 if (false /* remove once this is implemented */) {
14 assertEquals("getAndSet should return initial value,",
15 initval, b.getAndSet(newval));
16 assertEquals("get should return new value,",
17 newval, b.get());
18 }
19 }
20 }