public class LinkedListTest 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 |
---|
LinkedListTest() |
Modifier and Type | Method and Description |
---|---|
void |
testAdd()
add succeeds
|
void |
testAddAll1()
addAll(null) throws NPE
|
void |
testAddAll2_IndexOutOfBoundsException()
addAll with too large an index throws IOOBE
|
void |
testAddAll4_BadIndex()
addAll with negative index throws IOOBE
|
void |
testAddAll5()
Queue contains all elements, in traversal order, of successful addAll
|
void |
testAddFirst()
peek returns element inserted with addFirst
|
void |
testClear()
clear removes all elements
|
void |
testConstructor1()
new queue is empty
|
void |
testConstructor3()
Initializing from null Collection throws NPE
|
void |
testConstructor6()
Queue contains all elements of collection used to initialize
|
void |
testContains()
contains(x) reports true when elements added but not yet removed
|
void |
testContainsAll()
containsAll(c) is true when c contains a subset of elements
|
void |
testDescendingIterator()
Descending iterator iterates through all elements
|
void |
testDescendingIteratorOrdering()
Descending iterator ordering is reverse FIFO
|
void |
testDescendingIteratorRemove()
descendingIterator.remove removes current element
|
void |
testElement()
element returns next element, or throws NSEE if empty
|
void |
testEmpty()
isEmpty is true before add, false after
|
void |
testEmptyIterator()
iterator of empty collection has no elements
|
void |
testFirstElement() |
void |
testIterator()
iterator iterates through all elements
|
void |
testIteratorOrdering()
iterator ordering is FIFO
|
void |
testIteratorRemove()
iterator.remove removes current element
|
void |
testLastElement()
getLast returns next element, or throws NSEE if empty
|
void |
testOffer()
Offer succeeds
|
void |
testOfferFirst()
OfferFirst succeeds
|
void |
testOfferLast()
OfferLast succeeds
|
void |
testOfferNull()
offer(null) succeeds
|
void |
testPeek()
peek returns next element, or null if empty
|
void |
testPeekFirst()
peekFirst returns next element, or null if empty
|
void |
testPeekLast()
peekLast returns next element, or null if empty
|
void |
testPoll()
poll succeeds unless empty
|
void |
testPollLast()
pollLast succeeds unless empty
|
void |
testPop()
pop removes next element, or throws NSEE if empty
|
void |
testPush()
peekFirst returns element inserted with push
|
void |
testRemove()
remove removes next element, or throws NSEE if empty
|
void |
testRemoveAll()
removeAll(c) removes only those elements of c and reports true if changed
|
void |
testRemoveElement()
remove(x) removes x and returns true if present
|
void |
testRemoveFirstOccurrence()
removeFirstOccurrence(x) removes x and returns true if present
|
void |
testRemoveLastOccurrence()
removeLastOccurrence(x) removes x and returns true if present
|
void |
testRetainAll()
retainAll(c) retains only those elements of c and reports true if changed
|
void |
testSize()
size changes when elements added and removed
|
void |
testToArray_NullArg()
toArray(null) throws NullPointerException
|
void |
testToArray()
toArray contains all elements in FIFO order
|
void |
testToArray1_BadArg()
toArray(incompatible array type) throws ArrayStoreException
|
void |
testToArray2()
toArray(a) contains all elements in FIFO order
|
void |
testToString()
toString contains toStrings 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 testConstructor1()
public void testConstructor3()
public void testConstructor6()
public void testEmpty()
public void testSize()
public void testOfferNull()
public void testOffer()
public void testAdd()
public void testAddAll1()
public void testAddAll5()
public void testAddAll2_IndexOutOfBoundsException()
public void testAddAll4_BadIndex()
public void testPoll()
public void testPeek()
public void testElement()
public void testRemove()
public void testRemoveElement()
public void testContains()
public void testClear()
public void testContainsAll()
public void testRetainAll()
public void testRemoveAll()
public void testToArray()
public void testToArray2()
public void testToArray_NullArg()
public void testToArray1_BadArg()
public void testIterator()
public void testEmptyIterator()
public void testIteratorOrdering()
public void testIteratorRemove()
public void testDescendingIterator()
public void testDescendingIteratorOrdering()
public void testDescendingIteratorRemove()
public void testToString()
public void testAddFirst()
public void testPush()
public void testPop()
public void testOfferFirst()
public void testOfferLast()
public void testPollLast()
public void testPeekFirst()
public void testPeekLast()
public void testFirstElement()
public void testLastElement()
public void testRemoveFirstOccurrence()
public void testRemoveLastOccurrence()