Class ConcurrentSkipListSubMapTest

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

public class ConcurrentSkipListSubMapTest
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
ConcurrentSkipListSubMapTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
           
 void testCeilingEntry()
          ceilingEntry returns next entry.
 void testClear()
          clear removes all pairs
 void testContainsKey_NullPointerException()
          containsKey(null) of nonempty map throws NPE
 void testContainsKey()
          containsKey returns true for contained key
 void testContainsValue_NullPointerException()
          containsValue(null) throws NPE
 void testContainsValue()
          containsValue returns true for held values
 void testDescendingAscendingKeySetToArray()
          keySet.toArray returns contains all keys
 void testDescendingCeilingEntry()
          ceilingEntry returns next entry.
 void testDescendingClear()
          clear removes all pairs
 void testDescendingContainsKey_NullPointerException()
          containsKey(null) of empty map throws NPE
 void testDescendingContainsKey()
          containsKey returns true for contained key
 void testDescendingContainsValue_NullPointerException()
          containsValue(null) throws NPE
 void testDescendingContainsValue()
          containsValue returns true for held values
 void testDescendingDescendingKeySetToArray()
          descendingkeySet.toArray returns contains all keys
 void testDescendingEntrySet()
          entrySet contains all pairs
 void testDescendingEquals()
          Maps with same contents are equal
 void testDescendingFirstKey()
          firstKey returns first key
 void testDescendingFloorEntry()
          floorEntry returns preceding entry.
 void testDescendingGet_NullPointerException()
          get(null) of empty map throws NPE
 void testDescendingGet()
          get returns the correct element at the given key, or null if not present
 void testDescendingHeadMapContents()
          headMap returns map with keys in requested range
 void testDescendingHigherEntry()
          higherEntry returns next entry.
 void testDescendingIsEmpty()
          isEmpty is true of empty map and false for non-empty
 void testDescendingKeySet()
          keySet returns a Set containing all the keys
 void testDescendingKeySetOrder()
          keySet is ordered
 void testDescendingKeySetToArray()
          descendingkeySet.toArray returns contains all keys
 void testDescendingLastKey()
          lastKey returns last key
 void testDescendingLowerEntry()
          lowerEntry returns preceding entry.
 void testDescendingPollFirstEntry()
          pollFirstEntry returns entries in order
 void testDescendingPollLastEntry()
          pollLastEntry returns entries in order
 void testDescendingPut1_NullPointerException()
          put(null,x) throws NPE
 void testDescendingPutAll()
          putAll adds all key-value pairs from the given map
 void testDescendingPutIfAbsent()
          putIfAbsent works when the given key is not present
 void testDescendingPutIfAbsent1_NullPointerException()
          putIfAbsent(null, x) throws NPE
 void testDescendingPutIfAbsent2()
          putIfAbsent does not add the pair if the key is already present
 void testDescendingRemove()
          remove removes the correct key-value pair from the map
 void testDescendingRemove1_NullPointerException()
          remove(null) throws NPE
 void testDescendingRemove2_NullPointerException()
          remove(null, x) throws NPE
 void testDescendingRemove2()
          remove(key,value) removes only if pair present
 void testDescendingReplace_NullPointerException()
          replace(null, x) throws NPE
 void testDescendingReplace()
          replace fails when the given key is not present
 void testDescendingReplace2()
          replace succeeds if the key is already present
 void testDescendingReplaceValue_NullPointerException()
          replace(null, x, y) throws NPE
 void testDescendingReplaceValue()
          replace value fails when the given key not mapped to expected value
 void testDescendingReplaceValue2()
          replace value succeeds when the given key mapped to expected value
 void testDescendingSerialization()
          A deserialized map equals original
 void testDescendingSize()
          size returns the correct values
 void testDescendingSubMapContents()
          subMap returns map with keys in requested range
 void testDescendingSubMapContents2()
           
 void testDescendingTailMapContents()
          headMap returns map with keys in requested range
 void testDescendingToString()
          toString contains toString of elements
 void testDescendingValues()
          values collection contains all values
 void testDescendingValuesToArray()
          Values.toArray contains all values
 void testEntrySet()
          entrySet contains all pairs
 void testEquals()
          Maps with same contents are equal
 void testFirstKey()
          firstKey returns first key
 void testFloorEntry()
          floorEntry returns preceding entry.
 void testGet_NullPointerException()
          get(null) of nonempty map throws NPE
 void testGet()
          get returns the correct element at the given key, or null if not present
 void testHeadMapContents()
          headMap returns map with keys in requested range
 void testHigherEntry()
          higherEntry returns next entry.
 void testIsEmpty()
          isEmpty is true of empty map and false for non-empty
 void testKeySet()
          keySet returns a Set containing all the keys
 void testKeySetOrder()
          keySet is ordered
 void testKeySetToArray()
          keySet.toArray returns contains all keys
 void testLastKey()
          lastKey returns last key
 void testLowerEntry()
          lowerEntry returns preceding entry.
 void testPollFirstEntry()
          pollFirstEntry returns entries in order
 void testPollLastEntry()
          pollLastEntry returns entries in order
 void testPut1_NullPointerException()
          put(null,x) throws NPE
 void testPutAll()
          putAll adds all key-value pairs from the given map
 void testPutIfAbsent()
          putIfAbsent works when the given key is not present
 void testPutIfAbsent1_NullPointerException()
          putIfAbsent(null, x) throws NPE
 void testPutIfAbsent2()
          putIfAbsent does not add the pair if the key is already present
 void testRemove()
          remove removes the correct key-value pair from the map
 void testRemove1_NullPointerException()
          remove(null) throws NPE
 void testRemove2_NullPointerException()
          remove(null, x) throws NPE
 void testRemove2()
          remove(key,value) removes only if pair present
 void testReplace_NullPointerException()
          replace(null, x) throws NPE
 void testReplace()
          replace fails when the given key is not present
 void testReplace2()
          replace succeeds if the key is already present
 void testReplaceValue_NullPointerException()
          replace(null, x, y) throws NPE
 void testReplaceValue()
          replace value fails when the given key not mapped to expected value
 void testReplaceValue2()
          replace value succeeds when the given key mapped to expected value
 void testSerialization()
          A deserialized map equals original
 void testSize()
          size returns the correct values
 void testSubMapContents()
          subMap returns map with keys in requested range
 void testSubMapContents2()
           
 void testTailMapContents()
          headMap returns map with keys in requested range
 void testToString()
          toString contains toString of elements
 void testValues()
          values collection contains all values
 void testValuesToArray()
          Values.toArray contains all values
 
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

ConcurrentSkipListSubMapTest

public ConcurrentSkipListSubMapTest()
Method Detail

main

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

suite

public static junit.framework.Test suite()

testClear

public void testClear()
clear removes all pairs


testEquals

public void testEquals()
Maps with same contents are equal


testContainsKey

public void testContainsKey()
containsKey returns true for contained key


testContainsValue

public void testContainsValue()
containsValue returns true for held values


testGet

public void testGet()
get returns the correct element at the given key, or null if not present


testIsEmpty

public void testIsEmpty()
isEmpty is true of empty map and false for non-empty


testFirstKey

public void testFirstKey()
firstKey returns first key


testLastKey

public void testLastKey()
lastKey returns last key


testKeySet

public void testKeySet()
keySet returns a Set containing all the keys


testKeySetOrder

public void testKeySetOrder()
keySet is ordered


testValues

public void testValues()
values collection contains all values


testKeySetToArray

public void testKeySetToArray()
keySet.toArray returns contains all keys


testDescendingKeySetToArray

public void testDescendingKeySetToArray()
descendingkeySet.toArray returns contains all keys


testValuesToArray

public void testValuesToArray()
Values.toArray contains all values


testEntrySet

public void testEntrySet()
entrySet contains all pairs


testPutAll

public void testPutAll()
putAll adds all key-value pairs from the given map


testPutIfAbsent

public void testPutIfAbsent()
putIfAbsent works when the given key is not present


testPutIfAbsent2

public void testPutIfAbsent2()
putIfAbsent does not add the pair if the key is already present


testReplace

public void testReplace()
replace fails when the given key is not present


testReplace2

public void testReplace2()
replace succeeds if the key is already present


testReplaceValue

public void testReplaceValue()
replace value fails when the given key not mapped to expected value


testReplaceValue2

public void testReplaceValue2()
replace value succeeds when the given key mapped to expected value


testRemove

public void testRemove()
remove removes the correct key-value pair from the map


testRemove2

public void testRemove2()
remove(key,value) removes only if pair present


testLowerEntry

public void testLowerEntry()
lowerEntry returns preceding entry.


testHigherEntry

public void testHigherEntry()
higherEntry returns next entry.


testFloorEntry

public void testFloorEntry()
floorEntry returns preceding entry.


testCeilingEntry

public void testCeilingEntry()
ceilingEntry returns next entry.


testPollFirstEntry

public void testPollFirstEntry()
pollFirstEntry returns entries in order


testPollLastEntry

public void testPollLastEntry()
pollLastEntry returns entries in order


testSize

public void testSize()
size returns the correct values


testToString

public void testToString()
toString contains toString of elements


testGet_NullPointerException

public void testGet_NullPointerException()
get(null) of nonempty map throws NPE


testContainsKey_NullPointerException

public void testContainsKey_NullPointerException()
containsKey(null) of nonempty map throws NPE


testContainsValue_NullPointerException

public void testContainsValue_NullPointerException()
containsValue(null) throws NPE


testPut1_NullPointerException

public void testPut1_NullPointerException()
put(null,x) throws NPE


testPutIfAbsent1_NullPointerException

public void testPutIfAbsent1_NullPointerException()
putIfAbsent(null, x) throws NPE


testReplace_NullPointerException

public void testReplace_NullPointerException()
replace(null, x) throws NPE


testReplaceValue_NullPointerException

public void testReplaceValue_NullPointerException()
replace(null, x, y) throws NPE


testRemove1_NullPointerException

public void testRemove1_NullPointerException()
remove(null) throws NPE


testRemove2_NullPointerException

public void testRemove2_NullPointerException()
remove(null, x) throws NPE


testSerialization

public void testSerialization()
                       throws java.lang.Exception
A deserialized map equals original

Throws:
java.lang.Exception

testSubMapContents

public void testSubMapContents()
subMap returns map with keys in requested range


testSubMapContents2

public void testSubMapContents2()

testHeadMapContents

public void testHeadMapContents()
headMap returns map with keys in requested range


testTailMapContents

public void testTailMapContents()
headMap returns map with keys in requested range


testDescendingClear

public void testDescendingClear()
clear removes all pairs


testDescendingEquals

public void testDescendingEquals()
Maps with same contents are equal


testDescendingContainsKey

public void testDescendingContainsKey()
containsKey returns true for contained key


testDescendingContainsValue

public void testDescendingContainsValue()
containsValue returns true for held values


testDescendingGet

public void testDescendingGet()
get returns the correct element at the given key, or null if not present


testDescendingIsEmpty

public void testDescendingIsEmpty()
isEmpty is true of empty map and false for non-empty


testDescendingFirstKey

public void testDescendingFirstKey()
firstKey returns first key


testDescendingLastKey

public void testDescendingLastKey()
lastKey returns last key


testDescendingKeySet

public void testDescendingKeySet()
keySet returns a Set containing all the keys


testDescendingKeySetOrder

public void testDescendingKeySetOrder()
keySet is ordered


testDescendingValues

public void testDescendingValues()
values collection contains all values


testDescendingAscendingKeySetToArray

public void testDescendingAscendingKeySetToArray()
keySet.toArray returns contains all keys


testDescendingDescendingKeySetToArray

public void testDescendingDescendingKeySetToArray()
descendingkeySet.toArray returns contains all keys


testDescendingValuesToArray

public void testDescendingValuesToArray()
Values.toArray contains all values


testDescendingEntrySet

public void testDescendingEntrySet()
entrySet contains all pairs


testDescendingPutAll

public void testDescendingPutAll()
putAll adds all key-value pairs from the given map


testDescendingPutIfAbsent

public void testDescendingPutIfAbsent()
putIfAbsent works when the given key is not present


testDescendingPutIfAbsent2

public void testDescendingPutIfAbsent2()
putIfAbsent does not add the pair if the key is already present


testDescendingReplace

public void testDescendingReplace()
replace fails when the given key is not present


testDescendingReplace2

public void testDescendingReplace2()
replace succeeds if the key is already present


testDescendingReplaceValue

public void testDescendingReplaceValue()
replace value fails when the given key not mapped to expected value


testDescendingReplaceValue2

public void testDescendingReplaceValue2()
replace value succeeds when the given key mapped to expected value


testDescendingRemove

public void testDescendingRemove()
remove removes the correct key-value pair from the map


testDescendingRemove2

public void testDescendingRemove2()
remove(key,value) removes only if pair present


testDescendingLowerEntry

public void testDescendingLowerEntry()
lowerEntry returns preceding entry.


testDescendingHigherEntry

public void testDescendingHigherEntry()
higherEntry returns next entry.


testDescendingFloorEntry

public void testDescendingFloorEntry()
floorEntry returns preceding entry.


testDescendingCeilingEntry

public void testDescendingCeilingEntry()
ceilingEntry returns next entry.


testDescendingPollFirstEntry

public void testDescendingPollFirstEntry()
pollFirstEntry returns entries in order


testDescendingPollLastEntry

public void testDescendingPollLastEntry()
pollLastEntry returns entries in order


testDescendingSize

public void testDescendingSize()
size returns the correct values


testDescendingToString

public void testDescendingToString()
toString contains toString of elements


testDescendingGet_NullPointerException

public void testDescendingGet_NullPointerException()
get(null) of empty map throws NPE


testDescendingContainsKey_NullPointerException

public void testDescendingContainsKey_NullPointerException()
containsKey(null) of empty map throws NPE


testDescendingContainsValue_NullPointerException

public void testDescendingContainsValue_NullPointerException()
containsValue(null) throws NPE


testDescendingPut1_NullPointerException

public void testDescendingPut1_NullPointerException()
put(null,x) throws NPE


testDescendingPutIfAbsent1_NullPointerException

public void testDescendingPutIfAbsent1_NullPointerException()
putIfAbsent(null, x) throws NPE


testDescendingReplace_NullPointerException

public void testDescendingReplace_NullPointerException()
replace(null, x) throws NPE


testDescendingReplaceValue_NullPointerException

public void testDescendingReplaceValue_NullPointerException()
replace(null, x, y) throws NPE


testDescendingRemove1_NullPointerException

public void testDescendingRemove1_NullPointerException()
remove(null) throws NPE


testDescendingRemove2_NullPointerException

public void testDescendingRemove2_NullPointerException()
remove(null, x) throws NPE


testDescendingSerialization

public void testDescendingSerialization()
                                 throws java.lang.Exception
A deserialized map equals original

Throws:
java.lang.Exception

testDescendingSubMapContents

public void testDescendingSubMapContents()
subMap returns map with keys in requested range


testDescendingSubMapContents2

public void testDescendingSubMapContents2()

testDescendingHeadMapContents

public void testDescendingHeadMapContents()
headMap returns map with keys in requested range


testDescendingTailMapContents

public void testDescendingTailMapContents()
headMap returns map with keys in requested range