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:
Morgan James Delagrange 2002-02-13 21:49:38 +00:00
parent c5c64c02d3
commit 4733a995ff
1 changed files with 14 additions and 4 deletions

View File

@ -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 $
* $Revision: 1.2 $
* $Date: 2002/02/13 20:59:12 $
* $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.3 $
* $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>
* @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
{
@ -107,4 +107,14 @@ public class TestLRUMap extends TestHashMap
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"));
}
}