org.apache.commons.math.util
Class OpenIntToDoubleHashMapTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.math.util.OpenIntToDoubleHashMapTest
All Implemented Interfaces:
junit.framework.Test

public class OpenIntToDoubleHashMapTest
extends junit.framework.TestCase

Test cases for the OpenIntToDoubleHashMap.


Constructor Summary
OpenIntToDoubleHashMapTest()
           
 
Method Summary
protected  void setUp()
           
 void testConcurrentModification()
           
 void testContainsKey()
           
 void testCopy()
           
 void testGetAbsent()
           
 void testGetFromEmpty()
           
 void testIterator()
           
 void testPutAbsentOnExisting()
           
 void testPutAndGet()
           
 void testPutAndGetWith0ExpectedSize()
           
 void testPutAndGetWithExpectedSize()
           
 void testPutKeysWithCollision2()
          Similar to testPutKeysWithCollisions() but exercises the codepaths in a slightly different manner.
 void testPutKeysWithCollisions()
          Regression test for a bug in findInsertionIndex where the hashing in the second probing loop was inconsistent with the first causing duplicate keys after the right sequence of puts and removes.
 void testPutOnExisting()
           
 void testRemove()
           
 void testRemove2()
           
 void testRemoveAbsent()
           
 void testRemoveFromEmpty()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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

OpenIntToDoubleHashMapTest

public OpenIntToDoubleHashMapTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

testPutAndGetWith0ExpectedSize

public void testPutAndGetWith0ExpectedSize()

testPutAndGetWithExpectedSize

public void testPutAndGetWithExpectedSize()

testPutAndGet

public void testPutAndGet()

testPutAbsentOnExisting

public void testPutAbsentOnExisting()

testPutOnExisting

public void testPutOnExisting()

testGetAbsent

public void testGetAbsent()

testGetFromEmpty

public void testGetFromEmpty()

testRemove

public void testRemove()

testRemove2

public void testRemove2()

testRemoveFromEmpty

public void testRemoveFromEmpty()

testRemoveAbsent

public void testRemoveAbsent()

testCopy

public void testCopy()

testContainsKey

public void testContainsKey()

testIterator

public void testIterator()

testConcurrentModification

public void testConcurrentModification()

testPutKeysWithCollisions

public void testPutKeysWithCollisions()
Regression test for a bug in findInsertionIndex where the hashing in the second probing loop was inconsistent with the first causing duplicate keys after the right sequence of puts and removes.


testPutKeysWithCollision2

public void testPutKeysWithCollision2()
Similar to testPutKeysWithCollisions() but exercises the codepaths in a slightly different manner.



Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.