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

  Modified:    collections/src/test/org/apache/commons/collections
                        TestObject.java
  Log:
  if a collection is serializable, it should have a canonical version in CVS
  for compatibility testing
  
  Revision  Changes    Path
  1.9       +36 -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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestObject.java	26 Feb 2002 18:08:58 -0000	1.8
  +++ TestObject.java	26 Feb 2002 20:52:17 -0000	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java,v
1.8 2002/02/26 18:08:58 morgand Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/02/26 18:08:58 $
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestObject.java,v
1.9 2002/02/26 20:52:17 morgand Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/02/26 20:52:17 $
    *
    * ====================================================================
    *
  @@ -65,6 +65,7 @@
   
   import java.io.ByteArrayInputStream;
   import java.io.ByteArrayOutputStream;
  +import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileOutputStream;
   import java.io.InputStream;
  @@ -90,7 +91,7 @@
    * test case (method) your {@link Object} fails.
    *
    * @author Rodney Waldhoff
  - * @version $Id: TestObject.java,v 1.8 2002/02/26 18:08:58 morgand Exp $
  + * @version $Id: TestObject.java,v 1.9 2002/02/26 20:52:17 morgand Exp $
    */
   public abstract class TestObject extends TestCase {
       public TestObject(String testName) {
  @@ -258,5 +259,36 @@
           retval.append(getCompatibilityVersion());
           retval.append(".obj");
           return retval.toString();
  +    }
  +
  +
  +    /**
  +     * If the test object is serializable, confirm that 
  +     * a canonical form exists in CVS
  +     * 
  +     */
  +    public void testCanonicalEmptyCollectionExists() {
  +        Object object = makeObject();
  +        if (!(object instanceof Serializable)) {
  +            return;
  +        }
  +        String name = getCanonicalEmptyCollectionName(object);
  +        assertTrue("Canonical empty collection is not in CVS",
  +                   new File(name).exists());
  +    }
  +
  +    /**
  +     * If the test object is serializable, confirm that 
  +     * a canonical form exists in CVS
  +     * 
  +     */
  +    public void testCanonicalFullCollectionExists() {
  +        Object object = makeObject();
  +        if (!(object instanceof Serializable)) {
  +            return;
  +        }
  +        String name = getCanonicalFullCollectionName(object);
  +        assertTrue("Canonical full collection is not in CVS",
  +                   new File(name).exists());
       }
   }
  
  
  

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