diff --git a/src/test/org/apache/commons/collections/TestMap.java b/src/test/org/apache/commons/collections/TestMap.java index f80cdc4f3..fb76af154 100644 --- a/src/test/org/apache/commons/collections/TestMap.java +++ b/src/test/org/apache/commons/collections/TestMap.java @@ -1,7 +1,7 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/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/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/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 @@ import java.util.NoSuchElementException; * * @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 @@ public abstract class TestMap extends TestObject { 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 @@ public abstract class TestMap extends TestObject { 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(); } diff --git a/src/test/org/apache/commons/collections/TestObject.java b/src/test/org/apache/commons/collections/TestObject.java index e490a038b..6f18d6bb6 100644 --- a/src/test/org/apache/commons/collections/TestObject.java +++ b/src/test/org/apache/commons/collections/TestObject.java @@ -1,7 +1,7 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/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/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/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 @@ import java.util.NoSuchElementException; * 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.