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 TestObject.java
Date Tue, 26 Feb 2002 20:18:54 GMT
morgand     02/02/26 12:18:53

  Modified:    collections/src/test/org/apache/commons/collections Tag:
                        collections_1_x_branch TestMap.java TestObject.java
  Log:
  merged with HEAD
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.4   +8 -33     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.3.2.3
  retrieving revision 1.3.2.4
  diff -u -r1.3.2.3 -r1.3.2.4
  --- TestMap.java	26 Feb 2002 06:28:41 -0000	1.3.2.3
  +++ TestMap.java	26 Feb 2002 20:18:53 -0000	1.3.2.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestMap.java,v
1.3.2.3 2002/02/26 06:28:41 morgand Exp $
  - * $Revision: 1.3.2.3 $
  - * $Date: 2002/02/26 06:28:41 $
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestMap.java,v
1.3.2.4 2002/02/26 20:18:53 morgand Exp $
  + * $Revision: 1.3.2.4 $
  + * $Date: 2002/02/26 20:18:53 $
    *
    * ====================================================================
    *
  @@ -87,7 +87,7 @@
    *
    * @author Michael Smith
    * @author Rodney Waldhoff
  - * @version $Id: TestMap.java,v 1.3.2.3 2002/02/26 06:28:41 morgand Exp $
  + * @version $Id: TestMap.java,v 1.3.2.4 2002/02/26 20:18:53 morgand Exp $
    */
   public abstract class TestMap extends TestObject {
   
  @@ -929,31 +929,6 @@
           assertEquals("Both maps are same size",map2.size(),getSampleKeys().length);
       }
   
  -
  -    public String getCanonicalEmptyMapName(Map map) {
  -        StringBuffer retval = new StringBuffer();
  -        retval.append("data/test/");
  -        String mapName = map.getClass().getName();
  -        mapName = mapName.substring(mapName.lastIndexOf(".")+1,mapName.length());
  -        retval.append(mapName);
  -        retval.append(".emptyMap.version");
  -        retval.append(getCompatibilityVersion());
  -        retval.append(".obj");
  -        return retval.toString();
  -    }
  -
  -    public String getCanonicalFullMapName(Map map) {
  -        StringBuffer retval = new StringBuffer();
  -        retval.append("data/test/");
  -        String mapName = map.getClass().getName();
  -        mapName = mapName.substring(mapName.lastIndexOf(".")+1,mapName.length());
  -        retval.append(mapName);
  -        retval.append(".fullMap.version");
  -        retval.append(getCompatibilityVersion());
  -        retval.append(".obj");
  -        return retval.toString();
  -    }
  -
       /**
        * Compare the current serialized form of the Map
        * against the canonical version in CVS.
  @@ -965,12 +940,12 @@
           map = makeEmptyMap();
           if (!(map instanceof Serializable)) return;
           
  -        writeExternalFormToDisk((Serializable) map, getCanonicalEmptyMapName(map));
  +        writeExternalFormToDisk((Serializable) map, getCanonicalEmptyCollectionName(map));
           */
   
           // test to make sure the canonical form has been preserved
           if (!(makeEmptyMap() instanceof Serializable)) return;
  -        map = (Map) readExternalFormFromDisk(getCanonicalEmptyMapName(makeEmptyMap()));
  +        map = (Map) readExternalFormFromDisk(getCanonicalEmptyCollectionName(makeEmptyMap()));
           assertTrue("Map is empty",map.isEmpty()  == true);
       }
   
  @@ -986,12 +961,12 @@
           map = makeFullMap();
           if (!(map instanceof Serializable)) return;
           
  -        writeExternalFormToDisk((Serializable) map, getCanonicalFullMapName(map));
  +        writeExternalFormToDisk((Serializable) map, getCanonicalFullCollectionName(map));
           */
   
           // test to make sure the canonical form has been preserved
           if (!(makeFullMap() instanceof Serializable)) return;
  -        map = (Map) readExternalFormFromDisk(getCanonicalFullMapName(makeFullMap()));
  +        map = (Map) readExternalFormFromDisk(getCanonicalFullCollectionName(makeFullMap()));
           assertEquals("Map is the right size",map.size(), getSampleKeys().length);
       }
   
  
  
  
  1.1.2.2   +34 -4     jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java
  
  Index: TestObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- TestObject.java	26 Feb 2002 00:48:14 -0000	1.1.2.1
  +++ TestObject.java	26 Feb 2002 20:18:53 -0000	1.1.2.2
  @@ -1,7 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java,v
1.1.2.1 2002/02/26 00:48:14 morgand Exp $
  - * $Revision: 1.1.2.1 $
  - * $Date: 2002/02/26 00:48:14 $
  +<<<<<<< TestObject.java
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java,v
1.1.2.2 2002/02/26 20:18:53 morgand Exp $
  + * $Revision: 1.1.2.2 $
  + * $Date: 2002/02/26 20:18:53 $
  +=======
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java,v
1.1.2.2 2002/02/26 20:18:53 morgand Exp $
  + * $Revision: 1.1.2.2 $
  + * $Date: 2002/02/26 20:18:53 $
  +>>>>>>> 1.8
    *
    * ====================================================================
    *
  @@ -90,7 +96,7 @@
    * test case (method) your {@link Object} fails.
    *
    * @author Rodney Waldhoff
  - * @version $Id: TestObject.java,v 1.1.2.1 2002/02/26 00:48:14 morgand Exp $
  + * @version $Id: TestObject.java,v 1.1.2.2 2002/02/26 20:18:53 morgand Exp $
    */
   public abstract class TestObject extends TestCase {
       public TestObject(String testName) {
  @@ -234,5 +240,29 @@
               byte[] objekt = writeExternalFormToBytes((Serializable) o);
               Object p = readExternalFormFromBytes(objekt);
           }
  +    }
  +
  +    public String getCanonicalEmptyCollectionName(Object object) {
  +        StringBuffer retval = new StringBuffer();
  +        retval.append("data/test/");
  +        String colName = object.getClass().getName();
  +        colName = colName.substring(colName.lastIndexOf(".")+1,colName.length());
  +        retval.append(colName);
  +        retval.append(".emptyCollection.version");
  +        retval.append(getCompatibilityVersion());
  +        retval.append(".obj");
  +        return retval.toString();
  +    }
  +
  +    public String getCanonicalFullCollectionName(Object object) {
  +        StringBuffer retval = new StringBuffer();
  +        retval.append("data/test/");
  +        String colName = object.getClass().getName();
  +        colName = colName.substring(colName.lastIndexOf(".")+1,colName.length());
  +        retval.append(colName);
  +        retval.append(".fullCollection.version");
  +        retval.append(getCompatibilityVersion());
  +        retval.append(".obj");
  +        return retval.toString();
       }
   }
  
  
  

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