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 Mon, 25 Feb 2002 20:57:08 GMT
morgand     02/02/25 12:57:08

  Modified:    collections/src/test/org/apache/commons/collections
                        TestMap.java TestObject.java
  Log:
  changed 'String COLLECTIONS_VERSION' to 'int COLLECTIONS_MAJOR_VERSION',
  separated COLLECTIONS_MAJOR_VERSION from COMPATIBILITY_VERSION
  
  Revision  Changes    Path
  1.12      +8 -8      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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TestMap.java	22 Feb 2002 22:21:50 -0000	1.11
  +++ TestMap.java	25 Feb 2002 20:57:08 -0000	1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestMap.java,v
1.11 2002/02/22 22:21:50 morgand Exp $
  - * $Revision: 1.11 $
  - * $Date: 2002/02/22 22:21:50 $
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestMap.java,v
1.12 2002/02/25 20:57:08 morgand Exp $
  + * $Revision: 1.12 $
  + * $Date: 2002/02/25 20:57:08 $
    *
    * ====================================================================
    *
  @@ -87,7 +87,7 @@
    *
    * @author Michael Smith
    * @author Rodney Waldhoff
  - * @version $Id: TestMap.java,v 1.11 2002/02/22 22:21:50 morgand Exp $
  + * @version $Id: TestMap.java,v 1.12 2002/02/25 20:57:08 morgand Exp $
    */
   public abstract class TestMap extends TestObject {
   
  @@ -936,8 +936,8 @@
           String mapName = map.getClass().getName();
           mapName = mapName.substring(mapName.lastIndexOf(".")+1,mapName.length());
           retval.append(mapName);
  -        retval.append(".emptyMap.");
  -        retval.append(COLLECTIONS_VERSION);
  +        retval.append(".emptyMap.version");
  +        retval.append(COMPATIBILITY_VERSION);
           retval.append(".obj");
           return retval.toString();
       }
  @@ -948,8 +948,8 @@
           String mapName = map.getClass().getName();
           mapName = mapName.substring(mapName.lastIndexOf(".")+1,mapName.length());
           retval.append(mapName);
  -        retval.append(".fullMap.");
  -        retval.append(COLLECTIONS_VERSION);
  +        retval.append(".fullMap.version");
  +        retval.append(COMPATIBILITY_VERSION);
           retval.append(".obj");
           return retval.toString();
       }
  
  
  
  1.6       +9 -5      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestObject.java	25 Feb 2002 18:14:57 -0000	1.5
  +++ TestObject.java	25 Feb 2002 20:57:08 -0000	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java,v
1.5 2002/02/25 18:14:57 morgand Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/02/25 18:14:57 $
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java,v
1.6 2002/02/25 20:57:08 morgand Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/02/25 20:57:08 $
    *
    * ====================================================================
    *
  @@ -90,18 +90,22 @@
    * test case (method) your {@link Object} fails.
    *
    * @author Rodney Waldhoff
  - * @version $Id: TestObject.java,v 1.5 2002/02/25 18:14:57 morgand Exp $
  + * @version $Id: TestObject.java,v 1.6 2002/02/25 20:57:08 morgand Exp $
    */
   public abstract class TestObject extends TestCase {
       public TestObject(String testName) {
           super(testName);
       }
   
  +    // current major release for Collections
  +    public static final int COLLECTIONS_MAJOR_VERSION = 2;
       // This constant makes it possible for TestMap (and other subclasses, 
       // if necessary) to automatically check CVS for a versionX copy of a 
       // Serialized object, so we can make sure that compatibility is maintained.  
       // See, for example, TestMap.getCanonicalFullMapName(Map map).
  -    public static final String COLLECTIONS_VERSION = "version2";
  +    // Subclasses can override this variable, indicating compatibility
  +    // with earlier Collections versions.
  +    public int COMPATIBILITY_VERSION = COLLECTIONS_MAJOR_VERSION;
   
       /**
        * Return a new, empty {@link Object} to used for testing.
  
  
  

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