added test for map capacity, which fails right now

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130517 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Morgan James Delagrange 2002-02-13 22:32:37 +00:00
parent 4733a995ff
commit 5dcc5d8747
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.3 2002/02/13 21:49:38 morgand Exp $
* $Revision: 1.3 $
* $Date: 2002/02/13 21:49:38 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestLRUMap.java,v 1.4 2002/02/13 22:32:37 morgand Exp $
* $Revision: 1.4 $
* $Date: 2002/02/13 22:32:37 $
*
* ====================================================================
*
@ -69,7 +69,7 @@ import java.util.HashMap;
/**
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
* @version $Id: TestLRUMap.java,v 1.3 2002/02/13 21:49:38 morgand Exp $
* @version $Id: TestLRUMap.java,v 1.4 2002/02/13 22:32:37 morgand Exp $
*/
public class TestLRUMap extends TestHashMap
{
@ -117,4 +117,14 @@ public class TestLRUMap extends TestHashMap
assertTrue("same key different value",map2.get(new Integer(4)).equals("bar"));
}
public void testCapacity() {
LRUMap map2 = new LRUMap(3);
map2.put(new Integer(1),"foo");
map2.put(new Integer(2),"foo");
map2.put(new Integer(3),"foo");
map2.put(new Integer(1),"foo");
assertTrue("size of Map should be 3, but was " + map2.size(), map2.size() == 3);
}
}