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 TestMap.java
Date Thu, 21 Feb 2002 20:14:37 GMT
morgand     02/02/21 12:14:37

  Modified:    collections/src/test/org/apache/commons/collections
                        TestMap.java
  Log:
  more detail for testEntrySetContains()
  
  Revision  Changes    Path
  1.7       +11 -6     jakarta-commons/collections/src/test/org/apache/commons/collections/TestMap.java
  
  Index: TestMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestMap.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestMap.java	21 Feb 2002 20:08:15 -0000	1.6
  +++ TestMap.java	21 Feb 2002 20:14:37 -0000	1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestMap.java,v
1.6 2002/02/21 20:08:15 morgand Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/02/21 20:08:15 $
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestMap.java,v
1.7 2002/02/21 20:14:37 morgand Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/02/21 20:14:37 $
    *
    * ====================================================================
    *
  @@ -77,7 +77,7 @@
    * test case (method) your {@link Map} fails.
    *
    * @author Rodney Waldhoff
  - * @version $Id: TestMap.java,v 1.6 2002/02/21 20:08:15 morgand Exp $
  + * @version $Id: TestMap.java,v 1.7 2002/02/21 20:14:37 morgand Exp $
    */
   public abstract class TestMap extends TestObject {
       public TestMap(String testName) {
  @@ -244,10 +244,15 @@
           Object o = set.iterator().next();
           assertTrue("entry set should contain valid element",set.contains(o));
   
  +        // create a fresh entry mapped to existing values
  +        DefaultMapEntry goodEntry  = new DefaultMapEntry("2","2");
  +        assertTrue("entry set should recognize externally constructed MapEntry objects",
  +                   set.contains(goodEntry));
  +
           // make a bogus entry
  -        DefaultMapEntry entry = new DefaultMapEntry("4","4");
  +        DefaultMapEntry badEntry = new DefaultMapEntry("4","4");
           assertTrue("entry set should not contain a bogus element",
  -                   set.contains(entry) == false);
  +                   set.contains(badEntry) == false);
           
   
       }
  
  
  

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