public class AtomicLongFieldUpdaterTest extends JSR166TestCase
JSR166TestCase.AdjustablePolicy, JSR166TestCase.CallableOne, JSR166TestCase.CheckedBarrier, JSR166TestCase.CheckedCallable<T>, JSR166TestCase.CheckedInterruptedCallable<T>, JSR166TestCase.CheckedInterruptedRunnable, JSR166TestCase.CheckedRecursiveAction, JSR166TestCase.CheckedRecursiveTask<T>, JSR166TestCase.CheckedRunnable, JSR166TestCase.LongPossiblyInterruptedRunnable, JSR166TestCase.MediumInterruptedRunnable, JSR166TestCase.MediumPossiblyInterruptedRunnable, JSR166TestCase.MediumRunnable, JSR166TestCase.NoOpCallable, JSR166TestCase.NoOpREHandler, JSR166TestCase.NoOpRunnable, JSR166TestCase.NPETask, JSR166TestCase.RunnableShouldThrow, JSR166TestCase.ShortInterruptedRunnable, JSR166TestCase.ShortRunnable, JSR166TestCase.SimpleThreadFactory, JSR166TestCase.SmallCallable, JSR166TestCase.SmallPossiblyInterruptedRunnable, JSR166TestCase.SmallRunnable, JSR166TestCase.StringTask, JSR166TestCase.ThreadShouldThrow, JSR166TestCase.TrackedCallable, JSR166TestCase.TrackedLongRunnable, JSR166TestCase.TrackedMediumRunnable, JSR166TestCase.TrackedNoOpRunnable, JSR166TestCase.TrackedRunnable, JSR166TestCase.TrackedShortRunnable, JSR166TestCase.TrackedSmallRunnable
Modifier and Type | Field and Description |
---|---|
protected long |
protectedField |
eight, expensiveTests, five, four, JAVA_CLASS_VERSION, JAVA_SPECIFICATION_VERSION, LONG_DELAY_MS, m1, m10, m2, m3, m4, m5, m6, MEDIUM_DELAY_MS, nine, one, seven, SHORT_DELAY_MS, six, SIZE, SMALL_DELAY_MS, TEST_STRING, testImplementationDetails, three, two, zero
Constructor and Description |
---|
AtomicLongFieldUpdaterTest() |
Modifier and Type | Method and Description |
---|---|
void |
testAddAndGet()
addAndGet adds given value to current, and returns current value
|
void |
testCompareAndSet()
compareAndSet succeeds in changing value if equal to expected else fails
|
void |
testCompareAndSetInMultipleThreads()
compareAndSet in one thread enables another waiting for value
to succeed
|
void |
testCompareAndSetProtected()
compareAndSet succeeds in changing protected field value if
equal to expected else fails
|
void |
testConstructor()
Construction with non-existent field throws RuntimeException
|
void |
testConstructor2()
construction with field not of given type throws IllegalArgumentException
|
void |
testConstructor3()
construction with non-volatile field throws IllegalArgumentException
|
void |
testDecrementAndGet()
decrementAndGet decrements and returns current value
|
void |
testGetAndAdd()
getAndAdd returns previous value and adds given value
|
void |
testGetAndDecrement()
getAndDecrement returns previous value and decrements
|
void |
testGetAndIncrement()
getAndIncrement returns previous value and increments
|
void |
testGetAndSet()
getAndSet returns previous value and sets to given value
|
void |
testGetLazySet()
get returns the last value lazySet by same thread
|
void |
testGetSet()
get returns the last value set or assigned
|
void |
testIncrementAndGet()
incrementAndGet increments and returns current value
|
void |
testWeakCompareAndSet()
repeated weakCompareAndSet succeeds in changing value when equal
to expected
|
addNamedTestClasses, assertIteratorExhausted, assertThrows, atLeastJava10, atLeastJava6, atLeastJava7, atLeastJava8, atLeastJava9, await, await, await, awaiter, countDowner, getShortDelay, jdk8ParameterizedTestSuite, latchAwaitingStringTask, newTestSuite, parameterizedTestSuite, permissivePolicy, possiblyInterruptedRunnable, runBare, runTest, runTestProfiled, runWithoutPermissions, runWithPermissions, runWithSecurityManagerWithPermissions, setDelays, setUp, shouldThrow, shouldThrow, tearDown, testMethodNames, threadAssertEquals, threadAssertEquals, threadAssertFalse, threadAssertNull, threadAssertSame, threadAssertTrue, threadFail, threadRecordFailure, threadShouldThrow, threadShouldThrow, threadUnexpectedException, trackedRunnable
public void testConstructor()
public void testConstructor2()
public void testConstructor3()
public void testGetSet()
public void testGetLazySet()
public void testCompareAndSet()
public void testCompareAndSetProtected()
public void testCompareAndSetInMultipleThreads() throws Exception
Exception
public void testWeakCompareAndSet()
public void testGetAndSet()
public void testGetAndAdd()
public void testGetAndDecrement()
public void testGetAndIncrement()
public void testAddAndGet()
public void testDecrementAndGet()
public void testIncrementAndGet()