public class CopyOnWriteArrayListTest 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
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 |
---|
CopyOnWriteArrayListTest() |
Modifier and Type | Method and Description |
---|---|
void |
testAdd1_IndexOutOfBoundsException()
add throws an IndexOutOfBoundsException on a negative index
|
void |
testAdd2_IndexOutOfBoundsException()
add throws an IndexOutOfBoundsException on a too high index
|
void |
testAddAll()
addAll adds each element from the given collection, including duplicates
|
void |
testAddAll1_IndexOutOfBoundsException()
addAll throws an IndexOutOfBoundsException on a negative index
|
void |
testAddAll2_IndexOutOfBoundsException()
addAll throws an IndexOutOfBoundsException on a too high index
|
void |
testAddAllAbsent()
addAllAbsent adds each element from the given collection that did not
already exist in the List
|
void |
testAddIfAbsent()
addIfAbsent will not add the element if it already exists in the list
|
void |
testAddIfAbsent2()
addIfAbsent adds the element when it does not exist in the list
|
void |
testAddIndex()
adding at an index places it in the indicated index
|
void |
testClear()
clear removes all elements from the list
|
void |
testClone()
Cloned list is equal
|
void |
testConstructor()
a new list is empty
|
void |
testConstructor2()
new list contains all elements of initializing array
|
void |
testConstructor3()
new list contains all elements of initializing collection
|
void |
testContains()
contains is true for added elements
|
void |
testContainsAll()
containsAll returns true for collections with subset of elements
|
void |
testEmptyIterator()
iterator of empty collection has no elements
|
void |
testEquals()
lists with same elements are equal and have same hashCode
|
void |
testGet()
get returns the value at the given index
|
void |
testGet1_IndexOutOfBoundsException()
get throws an IndexOutOfBoundsException on a negative index
|
void |
testGet2_IndexOutOfBoundsException()
get throws an IndexOutOfBoundsException on a too high index
|
void |
testIndexOf()
indexOf gives the index for the given object
|
void |
testIndexOf2()
indexOf gives the index based on the given index
at which to start searching
|
void |
testIsEmpty()
isEmpty returns true when empty, else false
|
void |
testIterator()
iterator() returns an iterator containing the elements of the
list in insertion order
|
void |
testIteratorRemove()
iterator.remove throws UnsupportedOperationException
|
void |
testLastIndexOf1()
lastIndexOf returns the index for the given object
|
void |
testLastIndexOf2()
lastIndexOf returns the index from the given starting point
|
void |
testListIterator1_IndexOutOfBoundsException()
listIterator throws an IndexOutOfBoundsException on a negative index
|
void |
testListIterator1()
listIterator traverses all elements
|
void |
testListIterator2_IndexOutOfBoundsException()
listIterator throws an IndexOutOfBoundsException on a too high index
|
void |
testListIterator2()
listIterator only returns those elements after the given index
|
void |
testRemove_int()
remove(int) removes and returns the object at the given index
|
void |
testRemove_Object()
remove(Object) removes the object if found and returns true
|
void |
testRemove1_IndexOutOfBounds()
remove throws an IndexOutOfBoundsException on a negative index
|
void |
testRemove2_IndexOutOfBounds()
remove throws an IndexOutOfBoundsException on a too high index
|
void |
testRemoveAll()
removeAll removes all elements from the given collection
|
void |
testSerialization()
a deserialized serialized list is equal
|
void |
testSet()
set changes the element at the given index
|
void |
testSet1_IndexOutOfBoundsException()
set throws an IndexOutOfBoundsException on a negative index
|
void |
testSet2()
set throws an IndexOutOfBoundsException on a too high index
|
void |
testSize()
size returns the number of elements
|
void |
testSubList()
sublists contains elements at indexes offset from their base
|
void |
testSubList1_IndexOutOfBoundsException()
subList throws an IndexOutOfBoundsException on a negative index
|
void |
testSubList2_IndexOutOfBoundsException()
subList throws an IndexOutOfBoundsException on a too high index
|
void |
testSubList3_IndexOutOfBoundsException()
subList throws IndexOutOfBoundsException when the second index
is lower then the first
|
void |
testToArray_ArrayStoreException()
toArray throws an ArrayStoreException when the given array
can not store the objects inside the list
|
void |
testToArray()
toArray() returns an Object array containing all elements from
the list in insertion order
|
void |
testToArray2()
toArray(Integer array) returns an Integer array containing all
elements from the list in insertion order
|
void |
testToString()
toString contains toString of elements
|
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 testAddAll()
public void testAddAllAbsent()
public void testAddIfAbsent()
public void testAddIfAbsent2()
public void testClear()
public void testClone()
public void testContains()
public void testAddIndex()
public void testEquals()
public void testContainsAll()
public void testGet()
public void testIndexOf()
public void testIndexOf2()
public void testIsEmpty()
public void testIterator()
public void testEmptyIterator()
public void testIteratorRemove()
public void testToString()
public void testLastIndexOf1()
public void testLastIndexOf2()
public void testListIterator1()
public void testListIterator2()
public void testRemove_int()
public void testRemove_Object()
public void testRemoveAll()
public void testSet()
public void testSize()
public void testToArray()
public void testToArray2()
public void testSubList()
public void testToArray_ArrayStoreException()
public void testGet1_IndexOutOfBoundsException()
public void testGet2_IndexOutOfBoundsException()
public void testSet1_IndexOutOfBoundsException()
public void testSet2()
public void testAdd1_IndexOutOfBoundsException()
public void testAdd2_IndexOutOfBoundsException()
public void testRemove1_IndexOutOfBounds()
public void testRemove2_IndexOutOfBounds()
public void testAddAll1_IndexOutOfBoundsException()
public void testAddAll2_IndexOutOfBoundsException()
public void testListIterator1_IndexOutOfBoundsException()
public void testListIterator2_IndexOutOfBoundsException()
public void testSubList1_IndexOutOfBoundsException()
public void testSubList2_IndexOutOfBoundsException()
public void testSubList3_IndexOutOfBoundsException()