commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morg...@apache.org
Subject cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestLRUMap.java
Date Wed, 13 Feb 2002 22:32:37 GMT
morgand     02/02/13 14:32:37

  Modified:    collections/src/test/org/apache/commons/collections
                        TestLRUMap.java
  Log:
  added test for map capacity, which fails right now
  
  Revision  Changes    Path
  1.4       +14 -4     jakarta-commons/collections/src/test/org/apache/commons/collections/TestLRUMap.java
  
  Index: TestLRUMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestLRUMap.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestLRUMap.java	13 Feb 2002 21:49:38 -0000	1.3
  +++ TestLRUMap.java	13 Feb 2002 22:32:37 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /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/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 @@
   
   /**
    * @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
   {
  @@ -115,6 +115,16 @@
           map2.put(new Integer(4),"bar");
   
           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);
       }
   
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message