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 Fri, 15 Feb 2002 20:50:37 GMT
morgand     02/02/15 12:50:37

  Modified:    collections/src/test/org/apache/commons/collections
                        TestLRUMap.java
  Log:
  added test for inserting null values to the map
  
  Revision  Changes    Path
  1.9       +18 -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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestLRUMap.java	14 Feb 2002 22:44:01 -0000	1.8
  +++ TestLRUMap.java	15 Feb 2002 20:50:37 -0000	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestLRUMap.java,v
1.8 2002/02/14 22:44:01 morgand Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/02/14 22:44:01 $
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestLRUMap.java,v
1.9 2002/02/15 20:50:37 morgand Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/02/15 20:50:37 $
    *
    * ====================================================================
    *
  @@ -76,7 +76,7 @@
    * 
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @author <a href="mailto:morgand@apache.org">Morgan Delagrange</a>
  - * @version $Id: TestLRUMap.java,v 1.8 2002/02/14 22:44:01 morgand Exp $
  + * @version $Id: TestLRUMap.java,v 1.9 2002/02/15 20:50:37 morgand Exp $
    */
   public class TestLRUMap extends TestHashMap
   {
  @@ -154,6 +154,20 @@
           assertTrue("map should contain the Integer(4) object",
                      map2.containsKey(new Integer(4)));
       }
  +
  +
  +    public void testMapSupportsNullValues() {
  +        Map map = makeMap();
  +        map.put(new Integer(1),"foo");
  +        
  +        assertTrue("no null values in Map",map.containsValue(null) == false);
  +
  +        map.put(new Integer(2),null);
  +
  +        assertTrue("null value in Map",map.containsValue(null));
  +        assertTrue("key to a null value",map.containsKey(new Integer(2)));
  +    }
  +
   
       public void testExternalizable() throws IOException, ClassNotFoundException {
           /*
  
  
  

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