Class TreeSubSetTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by JSR166TestCase
              extended by TreeSubSetTest
All Implemented Interfaces:
junit.framework.Test

public class TreeSubSetTest
extends JSR166TestCase


Nested Class Summary
 
Nested classes/interfaces inherited from class 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
 
Field Summary
 
Fields inherited from class JSR166TestCase
eight, expensiveTests, five, four, 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, three, two, zero
 
Constructor Summary
TreeSubSetTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
           
 void testAdd()
          Add of comparable element succeeds
 void testAddAll1()
          addAll(null) throws NPE
 void testAddAll2()
          addAll of a collection with null elements throws NPE
 void testAddAll3()
          addAll of a collection with any null elements throws NPE after possibly adding some elements
 void testAddAll5()
          Set contains all elements of successful addAll
 void testAddDup()
          Add of duplicate element fails
 void testAddNonComparable()
          Add of non-Comparable throws CCE
 void testAddNull()
          add(null) throws NPE
 void testCeiling()
          ceiling returns next element
 void testClear()
          clear removes all elements
 void testConstructor1()
          A new set has unbounded capacity
 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 testDescendingAdd()
          Add of comparable element succeeds
 void testDescendingAddAll1()
          addAll(null) throws NPE
 void testDescendingAddAll2()
          addAll of a collection with null elements throws NPE
 void testDescendingAddAll3()
          addAll of a collection with any null elements throws NPE after possibly adding some elements
 void testDescendingAddAll5()
          Set contains all elements of successful addAll
 void testDescendingAddDup()
          Add of duplicate element fails
 void testDescendingAddNonComparable()
          Add of non-Comparable throws CCE
 void testDescendingCeiling()
          ceiling returns next element
 void testDescendingClear()
          clear removes all elements
 void testDescendingContains()
          contains(x) reports true when elements added but not yet removed
 void testDescendingContainsAll()
          containsAll(c) is true when c contains a subset of elements
 void testDescendingEmptyIterator()
          iterator of empty set has no elements
 void testDescendingFloor()
          floor returns preceding element
 void testDescendingHeadSetContents()
          headSet returns set with keys in requested range
 void testDescendingHigher()
          higher returns next element
 void testDescendingIterator()
          iterator iterates through all elements
 void testDescendingIteratorRemove()
          iterator.remove removes current element
 void testDescendingLower()
          lower returns preceding element
 void testDescendingPoll()
          poll succeeds unless empty
 void testDescendingRemoveAll()
          removeAll(c) removes only those elements of c and reports true if changed
 void testDescendingRemoveElement()
          remove(x) removes x and returns true if present
 void testDescendingRetainAll()
          retainAll(c) retains only those elements of c and reports true if changed
 void testDescendingSerialization()
          A deserialized serialized set has same elements
 void testDescendingSize()
          size changes when elements added and removed
 void testDescendingSubSetContents()
          subSet returns set with keys in requested range
 void testDescendingSubSetContents2()
           
 void testDescendingTailSetContents()
          tailSet returns set with keys in requested range
 void testDescendingToArray()
          toArray contains all elements
 void testDescendingToArray2()
          toArray(a) contains all elements
 void testDescendingToString()
          toString contains toStrings of elements
 void testEmpty()
          isEmpty is true before add, false after
 void testEmptyIterator()
          iterator of empty set has no elements
 void testFloor()
          floor returns preceding element
 void testHeadSetContents()
          headSet returns set with keys in requested range
 void testHigher()
          higher returns next element
 void testIterator()
          iterator iterates through all elements
 void testIteratorRemove()
          iterator.remove removes current element
 void testLower()
          lower returns preceding element
 void testPoll()
          poll succeeds unless 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 testRetainAll()
          retainAll(c) retains only those elements of c and reports true if changed
 void testSerialization()
          A deserialized serialized set has same elements
 void testSize()
          size changes when elements added and removed
 void testSubSetContents()
          subSet returns set with keys in requested range
 void testSubSetContents2()
           
 void testTailSetContents()
          tailSet returns set with keys in requested range
 void testToArray()
          toArray contains all elements in sorted order
 void testToArray2()
          toArray(a) contains all elements in sorted order
 void testToString()
          toString contains toStrings of elements
 
Methods inherited from class JSR166TestCase
assertThreadJoinTimesOut, awaiter, checkEmpty, delay, getShortDelay, joinPool, latchAwaitingStringTask, newTestSuite, permissivePolicy, possiblyInterruptedRunnable, runTest, runTestProfiled, runWithoutPermissions, runWithPermissions, setDelays, setUp, shouldThrow, shouldThrow, tearDown, threadAssertEquals, threadAssertEquals, threadAssertFalse, threadAssertNull, threadAssertSame, threadAssertTrue, threadFail, threadRecordFailure, threadShouldThrow, threadShouldThrow, threadUnexpectedException, trackedRunnable
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeSubSetTest

public TreeSubSetTest()
Method Detail

main

public static void main(java.lang.String[] args)

suite

public static junit.framework.Test suite()

testConstructor1

public void testConstructor1()
A new set has unbounded capacity


testEmpty

public void testEmpty()
isEmpty is true before add, false after


testSize

public void testSize()
size changes when elements added and removed


testAddNull

public void testAddNull()
add(null) throws NPE


testAdd

public void testAdd()
Add of comparable element succeeds


testAddDup

public void testAddDup()
Add of duplicate element fails


testAddNonComparable

public void testAddNonComparable()
Add of non-Comparable throws CCE


testAddAll1

public void testAddAll1()
addAll(null) throws NPE


testAddAll2

public void testAddAll2()
addAll of a collection with null elements throws NPE


testAddAll3

public void testAddAll3()
addAll of a collection with any null elements throws NPE after possibly adding some elements


testAddAll5

public void testAddAll5()
Set contains all elements of successful addAll


testPoll

public void testPoll()
poll succeeds unless empty


testRemoveElement

public void testRemoveElement()
remove(x) removes x and returns true if present


testContains

public void testContains()
contains(x) reports true when elements added but not yet removed


testClear

public void testClear()
clear removes all elements


testContainsAll

public void testContainsAll()
containsAll(c) is true when c contains a subset of elements


testRetainAll

public void testRetainAll()
retainAll(c) retains only those elements of c and reports true if changed


testRemoveAll

public void testRemoveAll()
removeAll(c) removes only those elements of c and reports true if changed


testLower

public void testLower()
lower returns preceding element


testHigher

public void testHigher()
higher returns next element


testFloor

public void testFloor()
floor returns preceding element


testCeiling

public void testCeiling()
ceiling returns next element


testToArray

public void testToArray()
toArray contains all elements in sorted order


testToArray2

public void testToArray2()
toArray(a) contains all elements in sorted order


testIterator

public void testIterator()
iterator iterates through all elements


testEmptyIterator

public void testEmptyIterator()
iterator of empty set has no elements


testIteratorRemove

public void testIteratorRemove()
iterator.remove removes current element


testToString

public void testToString()
toString contains toStrings of elements


testSerialization

public void testSerialization()
                       throws java.lang.Exception
A deserialized serialized set has same elements

Throws:
java.lang.Exception

testSubSetContents

public void testSubSetContents()
subSet returns set with keys in requested range


testSubSetContents2

public void testSubSetContents2()

testHeadSetContents

public void testHeadSetContents()
headSet returns set with keys in requested range


testTailSetContents

public void testTailSetContents()
tailSet returns set with keys in requested range


testDescendingSize

public void testDescendingSize()
size changes when elements added and removed


testDescendingAdd

public void testDescendingAdd()
Add of comparable element succeeds


testDescendingAddDup

public void testDescendingAddDup()
Add of duplicate element fails


testDescendingAddNonComparable

public void testDescendingAddNonComparable()
Add of non-Comparable throws CCE


testDescendingAddAll1

public void testDescendingAddAll1()
addAll(null) throws NPE


testDescendingAddAll2

public void testDescendingAddAll2()
addAll of a collection with null elements throws NPE


testDescendingAddAll3

public void testDescendingAddAll3()
addAll of a collection with any null elements throws NPE after possibly adding some elements


testDescendingAddAll5

public void testDescendingAddAll5()
Set contains all elements of successful addAll


testDescendingPoll

public void testDescendingPoll()
poll succeeds unless empty


testDescendingRemoveElement

public void testDescendingRemoveElement()
remove(x) removes x and returns true if present


testDescendingContains

public void testDescendingContains()
contains(x) reports true when elements added but not yet removed


testDescendingClear

public void testDescendingClear()
clear removes all elements


testDescendingContainsAll

public void testDescendingContainsAll()
containsAll(c) is true when c contains a subset of elements


testDescendingRetainAll

public void testDescendingRetainAll()
retainAll(c) retains only those elements of c and reports true if changed


testDescendingRemoveAll

public void testDescendingRemoveAll()
removeAll(c) removes only those elements of c and reports true if changed


testDescendingLower

public void testDescendingLower()
lower returns preceding element


testDescendingHigher

public void testDescendingHigher()
higher returns next element


testDescendingFloor

public void testDescendingFloor()
floor returns preceding element


testDescendingCeiling

public void testDescendingCeiling()
ceiling returns next element


testDescendingToArray

public void testDescendingToArray()
toArray contains all elements


testDescendingToArray2

public void testDescendingToArray2()
toArray(a) contains all elements


testDescendingIterator

public void testDescendingIterator()
iterator iterates through all elements


testDescendingEmptyIterator

public void testDescendingEmptyIterator()
iterator of empty set has no elements


testDescendingIteratorRemove

public void testDescendingIteratorRemove()
iterator.remove removes current element


testDescendingToString

public void testDescendingToString()
toString contains toStrings of elements


testDescendingSerialization

public void testDescendingSerialization()
                                 throws java.lang.Exception
A deserialized serialized set has same elements

Throws:
java.lang.Exception

testDescendingSubSetContents

public void testDescendingSubSetContents()
subSet returns set with keys in requested range


testDescendingSubSetContents2

public void testDescendingSubSetContents2()

testDescendingHeadSetContents

public void testDescendingHeadSetContents()
headSet returns set with keys in requested range


testDescendingTailSetContents

public void testDescendingTailSetContents()
tailSet returns set with keys in requested range