unit test for reassigning keys
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c5c64c02d3
commit
4733a995ff
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestLRUMap.java,v 1.2 2002/02/13 20:59:12 morgand Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestLRUMap.java,v 1.3 2002/02/13 21:49:38 morgand Exp $
|
||||||
* $Revision: 1.2 $
|
* $Revision: 1.3 $
|
||||||
* $Date: 2002/02/13 20:59:12 $
|
* $Date: 2002/02/13 21:49:38 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
|
@ -69,7 +69,7 @@ import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
|
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
|
||||||
* @version $Id: TestLRUMap.java,v 1.2 2002/02/13 20:59:12 morgand Exp $
|
* @version $Id: TestLRUMap.java,v 1.3 2002/02/13 21:49:38 morgand Exp $
|
||||||
*/
|
*/
|
||||||
public class TestLRUMap extends TestHashMap
|
public class TestLRUMap extends TestHashMap
|
||||||
{
|
{
|
||||||
|
@ -107,4 +107,14 @@ public class TestLRUMap extends TestHashMap
|
||||||
assertTrue("Last value inserted should not exist", map2.get(new Integer(4)) == null);
|
assertTrue("Last value inserted should not exist", map2.get(new Integer(4)) == null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testMultiplePuts() {
|
||||||
|
LRUMap map2 = new LRUMap(2);
|
||||||
|
map2.put(new Integer(4),"foo");
|
||||||
|
map2.put(new Integer(4),"bar");
|
||||||
|
map2.put(new Integer(4),"foo");
|
||||||
|
map2.put(new Integer(4),"bar");
|
||||||
|
|
||||||
|
assertTrue("same key different value",map2.get(new Integer(4)).equals("bar"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue