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 21:49:38 GMT
morgand     02/02/13 13:49:38

  Modified:    collections/src/test/org/apache/commons/collections
                        TestLRUMap.java
  Log:
  unit test for reassigning keys
  
  Revision  Changes    Path
  1.3       +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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestLRUMap.java	13 Feb 2002 20:59:12 -0000	1.2
  +++ TestLRUMap.java	13 Feb 2002 21:49:38 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /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/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 @@
   
   /**
    * @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
   {
  @@ -105,6 +105,16 @@
   
           assertTrue("Second to last value should exist",map2.get(new Integer(3)).equals("foo"));
           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"));
       }
   
   }
  
  
  

--
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