commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/primitives TestLongIterator.java TestFloatIterator.java TestCharIterator.java TestShortIterator.java TestDoubleIterator.java TestByteIterator.java TestIntIterator.java
Date Wed, 01 Oct 2003 21:54:56 GMT
scolebourne    2003/10/01 14:54:56

  Modified:    collections/src/test/org/apache/commons/collections/iterators
                        TestFilterIterator.java TestArrayIterator.java
                        TestCollatingIterator.java TestLoopingIterator.java
                        TestArrayListIterator2.java
                        TestObjectArrayIterator.java
                        TestArrayIterator2.java TestFilterListIterator.java
                        TestAll.java TestArrayListIterator.java
                        TestSingletonIterator.java
                        TestUniqueFilterIterator.java
                        TestIteratorChain.java
                        TestSingletonListIterator.java
                        TestObjectArrayListIterator.java
                        TestListIteratorWrapper.java
               collections/src/test/org/apache/commons/collections/primitives/adapters
                        TestFloatListIteratorListIterator.java
                        TestByteListIteratorListIterator.java
                        TestLongListIteratorListIterator.java
                        TestCharListIteratorListIterator.java
                        TestFloatIteratorIterator.java
                        TestShortIteratorIterator.java
                        TestIntIteratorIterator.java
                        TestIntListIteratorListIterator.java
                        TestDoubleListIteratorListIterator.java
                        TestDoubleIteratorIterator.java
                        TestByteIteratorIterator.java
                        TestShortListIteratorListIterator.java
                        TestCharIteratorIterator.java
                        TestLongIteratorIterator.java
               collections/src/test/org/apache/commons/collections/primitives
                        TestLongIterator.java TestFloatIterator.java
                        TestCharIterator.java TestShortIterator.java
                        TestDoubleIterator.java TestByteIterator.java
                        TestIntIterator.java
  Added:       collections/src/test/org/apache/commons/collections/iterators
                        AbstractTestListIterator.java
                        AbstractTestIterator.java
                        TestObjectArrayListIterator2.java
  Removed:     collections/src/test/org/apache/commons/collections/iterators
                        TestIterator.java TestListIterator.java
  Log:
  Rename TestIterator to AbstractTestIterator
  Rename TestListIterator to AbstractTestListIterator
  Add extra tests
  
  Revision  Changes    Path
  1.7       +4 -7      jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestFilterIterator.java
  
  Index: TestFilterIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestFilterIterator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestFilterIterator.java	31 Aug 2003 17:28:40 -0000	1.6
  +++ TestFilterIterator.java	1 Oct 2003 21:54:54 -0000	1.7
  @@ -71,11 +71,12 @@
   /**
    * Test the filter iterator.
    *
  + * @version $Revision$ $Date$
  + * 
    * @author  Jan Sorensen
    * @author Ralph Wagner
  - * @version $Revision$ $Date$
    */
  -public class TestFilterIterator extends TestIterator {
  +public class TestFilterIterator extends AbstractTestIterator {
   
       /** Creates new TestFilterIterator */
       public TestFilterIterator(String name) {
  @@ -127,10 +128,6 @@
           array = new String[] { "a", "b", "c" };
           list = new ArrayList(Arrays.asList(array));
           return makePassThroughFilter(list.iterator());
  -    }
  -
  -    public Object makeObject() {
  -        return makeFullIterator();
       }
   
       public void testRepeatedHasNext() {
  
  
  
  1.5       +8 -16     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestArrayIterator.java
  
  Index: TestArrayIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestArrayIterator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestArrayIterator.java	31 Aug 2003 17:28:40 -0000	1.4
  +++ TestArrayIterator.java	1 Oct 2003 21:54:54 -0000	1.5
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -65,18 +62,20 @@
   
   import junit.framework.Test;
   import junit.framework.TestSuite;
  +
   /**
    * Tests the ArrayIterator to ensure that the next() method will actually
    * perform the iteration rather than the hasNext() method.
  - * The code of this test was supplied by Mauricio S. Moura
  + * The code of this test was supplied by Mauricio S. Moura.
  + * 
  + * @version $Revision$ $Date$
    * 
    * @author James Strachan
    * @author Mauricio S. Moura
    * @author Morgan Delagrange
    * @author Stephen Colebourne
  - * @version $Id$
    */
  -public class TestArrayIterator extends TestIterator {
  +public class TestArrayIterator extends AbstractTestIterator {
   
       protected String[] testArray = { "One", "Two", "Three" };
   
  @@ -94,13 +93,6 @@
   
       public Iterator makeFullIterator() {
           return new ArrayIterator(testArray);
  -    }
  -
  -    /**
  -     * Return a new, empty {@link Object} to used for testing.
  -     */
  -    public Object makeObject() {
  -        return makeFullIterator();
       }
   
       public boolean supportsRemove() {
  
  
  
  1.4       +6 -17     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestCollatingIterator.java
  
  Index: TestCollatingIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestCollatingIterator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestCollatingIterator.java	31 Aug 2003 17:28:40 -0000	1.3
  +++ TestCollatingIterator.java	1 Oct 2003 21:54:54 -0000	1.4
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -58,7 +55,6 @@
    * <http://www.apache.org/>.
    *
    */
  -
   package org.apache.commons.collections.iterators;
   
   import java.util.ArrayList;
  @@ -72,10 +68,11 @@
   
   /**
    * Unit test suite for {@link CollatingIterator}.
  + * 
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestCollatingIterator extends TestIterator {
  +public class TestCollatingIterator extends AbstractTestIterator {
   
       //------------------------------------------------------------ Conventional
       
  @@ -129,14 +126,6 @@
           iter.addIterator(odds.iterator());
           iter.addIterator(fib.iterator());
           return iter;
  -    }
  -
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
  -    public boolean supportsEmptyIterator() {
  -        return true;
       }
   
       //------------------------------------------------------------------- Tests
  
  
  
  1.3       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestLoopingIterator.java
  
  Index: TestLoopingIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestLoopingIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestLoopingIterator.java	31 Aug 2003 17:28:40 -0000	1.2
  +++ TestLoopingIterator.java	1 Oct 2003 21:54:54 -0000	1.3
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -68,10 +65,13 @@
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  +
   /**
  - * Tests the LoopingIterator class using jUnit.
  + * Tests the LoopingIterator class.
  + * 
  + * @version $Revision$ $Date$
    * 
  - * @author <a href="mailto:joncrlsn@users.sf.net">Jonathan Carlson</a>
  + * @author Jonathan Carlson
    * @author Stephen Colebourne
    */
   public class TestLoopingIterator extends TestCase {
  
  
  
  1.3       +8 -10     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestArrayListIterator2.java
  
  Index: TestArrayListIterator2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestArrayListIterator2.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestArrayListIterator2.java	31 Aug 2003 17:28:40 -0000	1.2
  +++ TestArrayListIterator2.java	1 Oct 2003 21:54:54 -0000	1.3
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -58,17 +55,18 @@
    * <http://www.apache.org/>.
    *
    */
  -
   package org.apache.commons.collections.iterators;
   
   import java.util.Iterator;
   
   import junit.framework.Test;
   import junit.framework.TestSuite;
  +
   /**
  - * @author <a href="mailto:neilotoole@users.sourceforge.net">Neil O'Toole</a>
  - * @see org.apache.commons.collections.iterators.TestArrayIterator2
  - * @version $Id$
  + * Test the ArrayListIterator class with primitives.
  + * 
  + * @version $Revision$ $Date$
  + * @author Neil O'Toole
    */
   public class TestArrayListIterator2 extends TestArrayIterator2 {
   
  
  
  
  1.3       +7 -15     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestObjectArrayIterator.java
  
  Index: TestObjectArrayIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestObjectArrayIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestObjectArrayIterator.java	31 Aug 2003 17:28:40 -0000	1.2
  +++ TestObjectArrayIterator.java	1 Oct 2003 21:54:54 -0000	1.3
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -65,16 +62,18 @@
   
   import junit.framework.Test;
   import junit.framework.TestSuite;
  +
   /**
    * Tests the ObjectArrayIterator.
    * 
  + * @version $Revision$ $Date$
  + * 
    * @author James Strachan
    * @author Mauricio S. Moura
    * @author Morgan Delagrange
    * @author Stephen Colebourne
  - * @version $Id$
    */
  -public class TestObjectArrayIterator extends TestIterator {
  +public class TestObjectArrayIterator extends AbstractTestIterator {
   
       protected String[] testArray = { "One", "Two", "Three" };
   
  @@ -112,13 +111,6 @@
   
       public boolean supportsRemove() {
           return false;
  -    }
  -
  -    /**
  -     * Return a new, empty {@link Object} to used for testing.
  -     */
  -    public Object makeObject() {
  -        return makeFullIterator();
       }
   
       public void testIterator() {
  
  
  
  1.5       +8 -16     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestArrayIterator2.java
  
  Index: TestArrayIterator2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestArrayIterator2.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestArrayIterator2.java	31 Aug 2003 17:28:40 -0000	1.4
  +++ TestArrayIterator2.java	1 Oct 2003 21:54:54 -0000	1.5
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -65,14 +62,16 @@
   
   import junit.framework.Test;
   import junit.framework.TestSuite;
  +
   /**
  - * Tests the ArrayIterator with primitive type arrays
  + * Tests the ArrayIterator with primitive type arrays.
  + * 
  + * @version $Revision$ $Date$
    * 
    * @author Morgan Delagrange
    * @author James Strachan
  - * @version $Id$
    */
  -public class TestArrayIterator2 extends TestIterator {
  +public class TestArrayIterator2 extends AbstractTestIterator {
   
       protected int[] testArray = { 2, 4, 6, 8 };
   
  @@ -90,13 +89,6 @@
   
       public Iterator makeFullIterator() {
           return new ArrayIterator(testArray);
  -    }
  -
  -    /**
  -     * Return a new, empty {@link Object} to used for testing.
  -     */
  -    public Object makeObject() {
  -        return makeFullIterator();
       }
   
       /*
  
  
  
  1.7       +7 -7      jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestFilterListIterator.java
  
  Index: TestFilterListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestFilterListIterator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestFilterListIterator.java	31 Aug 2003 17:28:40 -0000	1.6
  +++ TestFilterListIterator.java	1 Oct 2003 21:54:54 -0000	1.7
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -72,7 +69,10 @@
   import org.apache.commons.collections.Predicate;
   
   /**
  + * Tests the FilterListIterator class.
  + * 
    * @version $Revision$ $Date$
  + * 
    * @author Rodney Waldhoff
    */
   public class TestFilterListIterator extends TestCase {
  
  
  
  1.6       +5 -4      jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestAll.java
  
  Index: TestAll.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestAll.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestAll.java	31 Aug 2003 17:28:40 -0000	1.5
  +++ TestAll.java	1 Oct 2003 21:54:54 -0000	1.6
  @@ -83,6 +83,7 @@
           suite.addTest(TestArrayListIterator2.suite());
           suite.addTest(TestObjectArrayIterator.suite());
           suite.addTest(TestObjectArrayListIterator.suite());
  +        suite.addTest(TestObjectArrayListIterator2.suite());
           suite.addTest(TestCollatingIterator.suite());
           suite.addTest(TestFilterIterator.suite());
           suite.addTest(TestFilterListIterator.suite());
  
  
  
  1.3       +7 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestArrayListIterator.java
  
  Index: TestArrayListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestArrayListIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestArrayListIterator.java	31 Aug 2003 17:28:40 -0000	1.2
  +++ TestArrayListIterator.java	1 Oct 2003 21:54:54 -0000	1.3
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -67,10 +64,12 @@
   
   import junit.framework.Test;
   import junit.framework.TestSuite;
  +
   /**
  + * Test the ArrayListIterator class.
    * 
  - * @author Neil O'Toole - <a href="mailto:neilotoole@users.sourceforge.net">neilotoole@users.sourceforge.net</a>
  - * @version $Id$
  + * @version $Revision$ $Date$
  + * @author Neil O'Toole
    */
   public class TestArrayListIterator extends TestArrayIterator {
   
  
  
  
  1.6       +5 -11     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestSingletonIterator.java
  
  Index: TestSingletonIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestSingletonIterator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestSingletonIterator.java	31 Aug 2003 17:28:40 -0000	1.5
  +++ TestSingletonIterator.java	1 Oct 2003 21:54:54 -0000	1.6
  @@ -4,7 +4,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -67,10 +67,11 @@
    * Tests the SingletonIterator to ensure that the next() method will actually
    * perform the iteration rather than the hasNext() method.
    *
  + * @version $Revision$ $Date$
  + * 
    * @author James Strachan
  - * @version $Id$
    */
  -public class TestSingletonIterator extends TestIterator {
  +public class TestSingletonIterator extends AbstractTestIterator {
   
       private static final Object testValue = "foo";
       
  @@ -96,13 +97,6 @@
           return new SingletonIterator( testValue );
       }
   
  -    /**
  -     * Return a new, empty {@link Object} to used for testing.
  -     */
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public boolean supportsRemove() {
           return false;
       }
  
  
  
  1.5       +5 -13     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestUniqueFilterIterator.java
  
  Index: TestUniqueFilterIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestUniqueFilterIterator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestUniqueFilterIterator.java	31 Aug 2003 17:28:40 -0000	1.4
  +++ TestUniqueFilterIterator.java	1 Oct 2003 21:54:54 -0000	1.5
  @@ -66,17 +66,16 @@
   import junit.framework.TestSuite;
   
   /**
  - * Tests the ArrayIterator to ensure that the next() method will actually
  - * perform the iteration rather than the hasNext() method.
  - * The code of this test was supplied by Mauricio S. Moura
  + * Tests the UniqueFilterIterator class.
  + * 
  + * @version $Revision$ $Date$
    * 
    * @author James Strachan
    * @author Mauricio S. Moura
    * @author Morgan Delagrange
    * @author Stephen Colebourne
  - * @version $Revision$ $Date$
    */
  -public class TestUniqueFilterIterator extends TestIterator {
  +public class TestUniqueFilterIterator extends AbstractTestIterator {
   
       protected String[] testArray = {
           "One", "Two", "Three", "Four", "Five", "Six"
  @@ -115,13 +114,6 @@
           Iterator i = list1.iterator();
   
           return new UniqueFilterIterator(i);
  -    }
  -
  -    /**
  -     * Return a new, empty {@link Object} to used for testing.
  -     */
  -    public Object makeObject() {
  -        return makeFullIterator();
       }
   
       public void testIterator() {
  
  
  
  1.6       +7 -19     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestIteratorChain.java
  
  Index: TestIteratorChain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestIteratorChain.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestIteratorChain.java	31 Aug 2003 17:28:40 -0000	1.5
  +++ TestIteratorChain.java	1 Oct 2003 21:54:55 -0000	1.6
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -58,7 +55,6 @@
    * <http://www.apache.org/>.
    *
    */
  -
   package org.apache.commons.collections.iterators;
   
   import java.util.ArrayList;
  @@ -70,16 +66,15 @@
   import junit.framework.TestSuite;
   
   /**
  - * Tests the ArrayIterator to ensure that the next() method will actually
  - * perform the iteration rather than the hasNext() method.
  - * The code of this test was supplied by Mauricio S. Moura
  + * Tests the IteratorChain class.
  + * 
  + * @version $Revision$ $Date$
    * 
    * @author James Strachan
    * @author Mauricio S. Moura
    * @author Morgan Delagrange
  - * @version $Id$
    */
  -public class TestIteratorChain extends TestIterator {
  +public class TestIteratorChain extends AbstractTestIterator {
   
       protected String[] testArray = {
           "One", "Two", "Three", "Four", "Five", "Six"
  @@ -121,13 +116,6 @@
           chain.addIterator(list2.iterator());
           chain.addIterator(list3.iterator());
           return chain;
  -    }
  -
  -    /**
  -     * Return a new, empty {@link Object} to used for testing.
  -     */
  -    public Object makeObject() {
  -        return makeFullIterator();
       }
   
       public void testIterator() {
  
  
  
  1.6       +10 -13    jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestSingletonListIterator.java
  
  Index: TestSingletonListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestSingletonListIterator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestSingletonListIterator.java	31 Aug 2003 17:28:40 -0000	1.5
  +++ TestSingletonListIterator.java	1 Oct 2003 21:54:55 -0000	1.6
  @@ -4,7 +4,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,7 +57,6 @@
    */
   package org.apache.commons.collections.iterators;
   
  -import java.util.Iterator;
   import java.util.ListIterator;
   import java.util.NoSuchElementException;
   
  @@ -67,10 +66,11 @@
   /**
    * Tests the SingletonListIterator.
    *
  + * @version $Revision$ $Date$
  + * 
    * @author Stephen Colebourne
  - * @version $Id$
    */
  -public class TestSingletonListIterator extends TestIterator {
  +public class TestSingletonListIterator extends AbstractTestListIterator {
   
       private static final Object testValue = "foo";
       
  @@ -88,21 +88,18 @@
        * 
        * @return null
        */
  -    public Iterator makeEmptyIterator() {
  +    public ListIterator makeEmptyListIterator() {
           return null;
       }
   
  -    public Iterator makeFullIterator() {
  +    public ListIterator makeFullListIterator() {
           return new SingletonListIterator( testValue );
       }
   
  -    /**
  -     * Return a new, empty {@link Object} to used for testing.
  -     */
  -    public Object makeObject() {
  -        return makeFullIterator();
  +    public boolean supportsAdd() {
  +        return false;
       }
  -    
  +
       public boolean supportsRemove() {
           return false;
       }
  
  
  
  1.3       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestObjectArrayListIterator.java
  
  Index: TestObjectArrayListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestObjectArrayListIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestObjectArrayListIterator.java	31 Aug 2003 17:28:40 -0000	1.2
  +++ TestObjectArrayListIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -67,10 +64,13 @@
   
   import junit.framework.Test;
   import junit.framework.TestSuite;
  +
   /**
  + * Tests the ObjectArrayListIterator class.
  + * 
  + * @version $Revision$ $Date$
    * 
  - * @author <a href="mailto:neilotoole@users.sourceforge.net">Neil O'Toole</a>
  - * @version $Id$
  + * @author Neil O'Toole
    */
   public class TestObjectArrayListIterator extends TestObjectArrayIterator {
   
  
  
  
  1.4       +6 -16     jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestListIteratorWrapper.java
  
  Index: TestListIteratorWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestListIteratorWrapper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestListIteratorWrapper.java	31 Aug 2003 17:28:40 -0000	1.3
  +++ TestListIteratorWrapper.java	1 Oct 2003 21:54:55 -0000	1.4
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -58,7 +55,6 @@
    * <http://www.apache.org/>.
    *
    */
  -
   package org.apache.commons.collections.iterators;
   
   import java.util.ArrayList;
  @@ -74,10 +70,11 @@
    * Tests the ListIteratorWrapper to insure that it simulates
    * a ListIterator correctly.
    *
  + * @version $Revision$ $Date$
  + * 
    * @author Morgan Delagrange
  - * @version $Id$
    */
  -public class TestListIteratorWrapper extends TestIterator {
  +public class TestListIteratorWrapper extends AbstractTestIterator {
   
       protected String[] testArray = {
           "One", "Two", "Three", "Four", "Five", "Six"
  @@ -112,13 +109,6 @@
           Iterator i = list1.iterator();
   
           return new ListIteratorWrapper(i);
  -    }
  -
  -    /**
  -     * Return a new, empty {@link Object} to used for testing.
  -     */
  -    public Object makeObject() {
  -        return makeFullIterator();
       }
   
       public void testIterator() {
  
  
  
  1.1                  jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/AbstractTestListIterator.java
  
  Index: AbstractTestListIterator.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/AbstractTestListIterator.java,v 1.1 2003/10/01 21:54:54 scolebourne Exp $
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowledgement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgement may appear in the software itself,
   *    if and wherever such third-party acknowledgements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.commons.collections.iterators;
  
  import java.util.ArrayList;
  import java.util.Iterator;
  import java.util.ListIterator;
  import java.util.NoSuchElementException;
  
  /**
   * Abstract class for testing the ListIterator interface.
   * <p>
   * This class provides a framework for testing an implementation of ListIterator.
   * Concrete subclasses must provide the list iterator to be tested.
   * They must also specify certain details of how the list iterator operates by
   * overriding the supportsXxx() methods if necessary.
   * 
   * @since Commons Collections 3.0
   * @version $Revision: 1.1 $ $Date: 2003/10/01 21:54:54 $
   * 
   * @author Rodney Waldhoff
   * @author Stephen Colebourne
   */
  public abstract class AbstractTestListIterator extends AbstractTestIterator {
  
      /**
       * JUnit constructor.
       * 
       * @param testName  the test class name
       */
      public AbstractTestListIterator(String testName) {
          super(testName);
      }
  
      //-----------------------------------------------------------------------
      /**
       * Implement this method to return a list iterator over an empty collection.
       * 
       * @return an empty iterator
       */
      protected abstract ListIterator makeEmptyListIterator();
  
      /**
       * Implement this method to return a list iterator over a collection with elements.
       * 
       * @return a full iterator
       */
      protected abstract ListIterator makeFullListIterator();
  
      /**
       * Implements the abstract superclass method to return the list iterator.
       * 
       * @return an empty iterator
       */
      protected Iterator makeEmptyIterator() {
          return makeEmptyListIterator();
      }
  
      /**
       * Implements the abstract superclass method to return the list iterator.
       * 
       * @return a full iterator
       */
      protected Iterator makeFullIterator() {
          return makeFullListIterator();
      }
  
      /**
       * Whether or not we are testing an iterator that supports add().
       * Default is true.
       * 
       * @return true if Iterator supports add
       */
      protected boolean supportsAdd() {
          return true;
      }
  
      /**
       * Whether or not we are testing an iterator that supports set().
       * Default is true.
       * 
       * @return true if Iterator supports set
       */
      protected boolean supportsSet() {
          return true;
      }
  
      /**
       * The value to be used in the add and set tests.
       * Default is null.
       */
      protected Object addSetValue() {
          return null;
      }
  
      //-----------------------------------------------------------------------
      /**
       * Test that the empty list iterator contract is correct.
       */
      public void testEmptyListIteratorIsIndeedEmpty() {
          if (supportsEmptyIterator() == false) {
              return;
          }
  
          ListIterator it = makeEmptyListIterator();
          
          assertEquals(false, it.hasNext());
          assertEquals(0, it.nextIndex());
          assertEquals(false, it.hasPrevious());
          assertEquals(-1, it.previousIndex());
          
          // next() should throw a NoSuchElementException
          try {
              it.next();
              fail("NoSuchElementException must be thrown from empty ListIterator");
          } catch (NoSuchElementException e) {
          }
          
          // previous() should throw a NoSuchElementException
          try {
              it.previous();
              fail("NoSuchElementException must be thrown from empty ListIterator");
          } catch (NoSuchElementException e) {
          }
      }
      
      /**
       * Test navigation through the iterator.
       */
      public void testWalkForwardAndBack() {
          ArrayList list = new ArrayList();
          ListIterator it = makeFullListIterator();
          while (it.hasNext()) {
              list.add(it.next());
          }
          
          // check state at end
          assertEquals(false, it.hasNext());
          assertEquals(true, it.hasPrevious());
          try {
              it.next();
              fail("NoSuchElementException must be thrown from next at end of ListIterator");
          } catch (NoSuchElementException e) {
          }
          
          // loop back through comparing
          for (int i = list.size() - 1; i >= 0; i--) {
              assertEquals(i + 1, it.nextIndex());
              assertEquals(i, it.previousIndex());
          
              Object obj = list.get(i);
              assertEquals(obj, it.previous());
          }
          
          // check state at start
          assertEquals(true, it.hasNext());
          assertEquals(false, it.hasPrevious());
          try {
              it.previous();
              fail("NoSuchElementException must be thrown from previous at start of ListIterator");
          } catch (NoSuchElementException e) {
          }
      }
      
      /**
       * Test add behaviour.
       */
      public void testAdd() {
          ListIterator it = makeFullListIterator();
          
          if (supportsAdd() == false) {
              // check for UnsupportedOperationException if not supported
              try {
                  it.add(addSetValue());
              } catch (UnsupportedOperationException ex) {}
              return;
          }
          
          // add at start should be OK
          it.add(addSetValue());
  
          // add in middle and at end should be OK
          while (it.hasNext()) {
              it.next();
              it.add(addSetValue());
          }        
      }
      
      /**
       * Test set behaviour.
       */
      public void testSet() {
          ListIterator it = makeFullListIterator();
          
          if (supportsSet() == false) {
              // check for UnsupportedOperationException if not supported
              try {
                  it.set(addSetValue());
              } catch (UnsupportedOperationException ex) {}
              return;
          }
          
          // should throw IllegalStateException before next() called
          try {
              it.set(addSetValue());
              fail();
          } catch (IllegalStateException ex) {}
          
          // set after next should be fine
          it.next();
          it.set(addSetValue());
          
          // repeated set calls should be fine
          it.set(addSetValue());
  
          // remove then set
          if (supportsRemove()) {
              it.next();
              it.remove();
              try {
                  it.set(addSetValue());
                  fail("IllegalStateException must be thrown from set after remove");
              } catch (IllegalStateException e) {
              }
          }
          
          // add then set
          if (supportsAdd()) {
              it.next();
              it.add(addSetValue());
              try {
                  it.set(addSetValue());
                  fail("IllegalStateException must be thrown from set after add");
              } catch (IllegalStateException e) {
              }
          }
      }
      
      /**
       * Test remove after add behaviour.
       */
      public void testRemoveAfterAdd() {
          ListIterator it = makeFullListIterator();
          
          // add then remove
          if (supportsAdd() && supportsRemove()) {
              it.next();
              it.add(addSetValue());
              try {
                  it.remove();
                  fail("IllegalStateException must be thrown from remove after add");
              } catch (IllegalStateException e) {
              }
          }
      }
      
  }
  
  
  
  1.1                  jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/AbstractTestIterator.java
  
  Index: AbstractTestIterator.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/AbstractTestIterator.java,v 1.1 2003/10/01 21:54:54 scolebourne Exp $
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowledgement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgement may appear in the software itself,
   *    if and wherever such third-party acknowledgements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.commons.collections.iterators;
  
  import java.util.Iterator;
  import java.util.NoSuchElementException;
  
  import org.apache.commons.collections.TestObject;
  
  /**
   * Abstract class for testing the Iterator interface.
   * <p>
   * This class provides a framework for testing an implementation of Iterator.
   * Concrete subclasses must provide the iterator to be tested.
   * They must also specify certain details of how the iterator operates by
   * overriding the supportsXxx() methods if necessary.
   * 
   * @since Commons Collections 3.0
   * @version $Revision: 1.1 $ $Date: 2003/10/01 21:54:54 $
   * 
   * @author Morgan Delagrange
   * @author Stephen Colebourne
   */
  public abstract class AbstractTestIterator extends TestObject {
  
      /**
       * JUnit constructor.
       * 
       * @param testName  the test class name
       */
      public AbstractTestIterator(String testName) {
          super(testName);
      }
  
      //-----------------------------------------------------------------------
      /**
       * Implement this method to return an iterator over an empty collection.
       * 
       * @return an empty iterator
       */
      protected abstract Iterator makeEmptyIterator();
  
      /**
       * Implement this method to return an iterator over a collection with elements.
       * 
       * @return a full iterator
       */
      protected abstract Iterator makeFullIterator();
  
      /**
       * Implements the abstract superclass method to return the full iterator.
       * 
       * @return a full iterator
       */
      protected Object makeObject() {
          return makeFullIterator();
      }
  
      /**
       * Whether or not we are testing an iterator that can be empty.
       * Default is true.
       * 
       * @return true if Iterator can be empty
       */
      protected boolean supportsEmptyIterator() {
          return true;
      }
  
      /**
       * Whether or not we are testing an iterator that can contain elements.
       * Default is true.
       * 
       * @return true if Iterator can be full
       */
      protected boolean supportsFullIterator() {
          return true;
      }
  
      /**
       * Whether or not we are testing an iterator that supports remove().
       * Default is true.
       * 
       * @return true if Iterator supports remove
       */
      protected boolean supportsRemove() {
          return true;
      }
  
      //-----------------------------------------------------------------------
      /**
       * Test the empty iterator.
       */
      public void testEmptyIterator() {
          if (supportsEmptyIterator() == false) {
              return;
          }
  
          Iterator it = makeEmptyIterator();
          
          // hasNext() should return false
          assertEquals("hasNext() should return false for empty iterators", false, it.hasNext());
          
          // next() should throw a NoSuchElementException
          try {
              it.next();
              fail("NoSuchElementException must be thrown when Iterator is exhausted");
          } catch (NoSuchElementException e) {
          }
      }
  
      /**
       * Test normal iteration behaviour.
       */
      public void testFullIterator() {
          if (supportsFullIterator() == false) {
              return;
          }
  
          Iterator it = makeFullIterator();
  
          // hasNext() must be true (ensure makeFullIterator is correct!)
          assertEquals("hasNext() should return true for at least one element", true, it.hasNext());
  
          // next() must not throw exception (ensure makeFullIterator is correct!)
          try {
              it.next();
          } catch (NoSuchElementException e) {
              fail("Full iterators must have at least one element");
          }
  
          // iterate through
          while (it.hasNext()) {
              it.next();
          }
  
          // next() must throw NoSuchElementException now
          try {
              it.next();
              fail("NoSuchElementException must be thrown when Iterator is exhausted");
          } catch (NoSuchElementException e) {
          }
      }
  
      /**
       * Test remove behaviour.
       */
      public void testRemove() {
          Iterator it = makeFullIterator();
          
          if (supportsRemove() == false) {
              // check for UnsupportedOperationException if not supported
              try {
                  it.remove();
              } catch (UnsupportedOperationException ex) {}
              return;
          }
          
          // should throw IllegalStateException before next() called
          try {
              it.remove();
              fail();
          } catch (IllegalStateException ex) {}
          
          // remove after next should be fine
          it.next();
          it.remove();
          
          // should throw IllegalStateException for second remove()
          try {
              it.remove();
              fail();
          } catch (IllegalStateException ex) {}
      }
      
  }
  
  
  
  1.1                  jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestObjectArrayListIterator2.java
  
  Index: TestObjectArrayListIterator2.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestObjectArrayListIterator2.java,v 1.1 2003/10/01 21:54:54 scolebourne Exp $
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowledgement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgement may appear in the software itself,
   *    if and wherever such third-party acknowledgements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.commons.collections.iterators;
  
  import java.util.ListIterator;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  /**
   * Tests the ObjectArrayListIterator class.
   * 
   * @version $Revision: 1.1 $ $Date: 2003/10/01 21:54:54 $
   * 
   * @author Stephen Colebourne
   */
  public class TestObjectArrayListIterator2 extends AbstractTestListIterator {
  
      protected String[] testArray = { "One", "Two", "Three" };
      
      public TestObjectArrayListIterator2(String testName) {
          super(testName);
      }
  
      public static Test suite() {
          return new TestSuite(TestObjectArrayListIterator2.class);
      }
  
      public ListIterator makeEmptyListIterator() {
          return new ObjectArrayListIterator(new Object[0]);
      }
  
      public ListIterator makeFullListIterator() {
          return new ObjectArrayListIterator(testArray);
      }
  
      public ListIterator makeArrayListIterator(Object[] array) {
          return new ObjectArrayListIterator(array);
      }
  
      public boolean supportsAdd() {
          return false;
      }
      
      public boolean supportsRemove() {
          return false;
      }
  
  }
  
  
  
  1.4       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestFloatListIteratorListIterator.java
  
  Index: TestFloatListIteratorListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestFloatListIteratorListIterator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestFloatListIteratorListIterator.java	31 Aug 2003 17:28:38 -0000	1.3
  +++ TestFloatListIteratorListIterator.java	1 Oct 2003 21:54:55 -0000	1.4
  @@ -64,7 +64,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestListIterator;
  +import org.apache.commons.collections.iterators.AbstractTestListIterator;
   import org.apache.commons.collections.primitives.ArrayFloatList;
   import org.apache.commons.collections.primitives.FloatList;
   
  @@ -72,7 +72,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestFloatListIteratorListIterator extends TestListIterator {
  +public class TestFloatListIteratorListIterator extends AbstractTestListIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -88,10 +88,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public ListIterator makeEmptyListIterator() {
           return FloatListIteratorListIterator.wrap(makeEmptyFloatList().listIterator());
       }
  @@ -117,6 +113,10 @@
           return new float[] { (float)0, (float)1, (float)2, (float)3, (float)4, (float)5, (float)6, (float)7, (float)8, (float)9 };
       }
       
  +    protected Object addSetValue() {
  +        return new Float((float)1);
  +    }
  +
       // tests
       // ------------------------------------------------------------------------
   
  
  
  
  1.3       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestByteListIteratorListIterator.java
  
  Index: TestByteListIteratorListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestByteListIteratorListIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestByteListIteratorListIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestByteListIteratorListIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -64,7 +64,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestListIterator;
  +import org.apache.commons.collections.iterators.AbstractTestListIterator;
   import org.apache.commons.collections.primitives.ArrayByteList;
   import org.apache.commons.collections.primitives.ByteList;
   
  @@ -72,7 +72,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestByteListIteratorListIterator extends TestListIterator {
  +public class TestByteListIteratorListIterator extends AbstractTestListIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -88,10 +88,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public ListIterator makeEmptyListIterator() {
           return ByteListIteratorListIterator.wrap(makeEmptyByteList().listIterator());
       }
  @@ -117,6 +113,10 @@
           return new byte[] { (byte)0, (byte)1, (byte)2, (byte)3, (byte)4, (byte)5, (byte)6, (byte)7, (byte)8, (byte)9 };
       }
       
  +    protected Object addSetValue() {
  +        return new Byte((byte)1);
  +    }
  +
       // tests
       // ------------------------------------------------------------------------
   
  
  
  
  1.4       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestLongListIteratorListIterator.java
  
  Index: TestLongListIteratorListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestLongListIteratorListIterator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestLongListIteratorListIterator.java	31 Aug 2003 17:28:38 -0000	1.3
  +++ TestLongListIteratorListIterator.java	1 Oct 2003 21:54:55 -0000	1.4
  @@ -64,7 +64,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestListIterator;
  +import org.apache.commons.collections.iterators.AbstractTestListIterator;
   import org.apache.commons.collections.primitives.ArrayLongList;
   import org.apache.commons.collections.primitives.LongList;
   
  @@ -72,7 +72,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestLongListIteratorListIterator extends TestListIterator {
  +public class TestLongListIteratorListIterator extends AbstractTestListIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -88,10 +88,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public ListIterator makeEmptyListIterator() {
           return LongListIteratorListIterator.wrap(makeEmptyLongList().listIterator());
       }
  @@ -117,6 +113,10 @@
           return new long[] { (long)0, (long)1, (long)2, (long)3, (long)4, (long)5, (long)6, (long)7, (long)8, (long)9 };
       }
       
  +    protected Object addSetValue() {
  +        return new Long((long)1);
  +    }
  +
       // tests
       // ------------------------------------------------------------------------
   
  
  
  
  1.3       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestCharListIteratorListIterator.java
  
  Index: TestCharListIteratorListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestCharListIteratorListIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestCharListIteratorListIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestCharListIteratorListIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -64,7 +64,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestListIterator;
  +import org.apache.commons.collections.iterators.AbstractTestListIterator;
   import org.apache.commons.collections.primitives.ArrayCharList;
   import org.apache.commons.collections.primitives.CharList;
   
  @@ -72,7 +72,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestCharListIteratorListIterator extends TestListIterator {
  +public class TestCharListIteratorListIterator extends AbstractTestListIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -88,10 +88,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public ListIterator makeEmptyListIterator() {
           return CharListIteratorListIterator.wrap(makeEmptyCharList().listIterator());
       }
  @@ -117,6 +113,10 @@
           return new char[] { (char)0, (char)1, (char)2, (char)3, (char)4, (char)5, (char)6, (char)7, (char)8, (char)9 };
       }
       
  +    protected Object addSetValue() {
  +        return new Character((char)1);
  +    }
  +
       // tests
       // ------------------------------------------------------------------------
   
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestFloatIteratorIterator.java
  
  Index: TestFloatIteratorIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestFloatIteratorIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestFloatIteratorIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestFloatIteratorIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -62,7 +62,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.ArrayFloatList;
   import org.apache.commons.collections.primitives.FloatList;
   
  @@ -70,7 +70,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestFloatIteratorIterator extends TestIterator {
  +public class TestFloatIteratorIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -86,10 +86,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return FloatIteratorIterator.wrap(makeEmptyFloatList().iterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestShortIteratorIterator.java
  
  Index: TestShortIteratorIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestShortIteratorIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestShortIteratorIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestShortIteratorIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -62,7 +62,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.ArrayShortList;
   import org.apache.commons.collections.primitives.ShortList;
   
  @@ -70,7 +70,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestShortIteratorIterator extends TestIterator {
  +public class TestShortIteratorIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -86,10 +86,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return ShortIteratorIterator.wrap(makeEmptyShortList().iterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestIntIteratorIterator.java
  
  Index: TestIntIteratorIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestIntIteratorIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestIntIteratorIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestIntIteratorIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -62,7 +62,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.ArrayIntList;
   import org.apache.commons.collections.primitives.IntList;
   
  @@ -70,7 +70,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestIntIteratorIterator extends TestIterator {
  +public class TestIntIteratorIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -86,10 +86,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return IntIteratorIterator.wrap(makeEmptyIntList().iterator());
       }
  
  
  
  1.6       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestIntListIteratorListIterator.java
  
  Index: TestIntListIteratorListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestIntListIteratorListIterator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestIntListIteratorListIterator.java	31 Aug 2003 17:28:38 -0000	1.5
  +++ TestIntListIteratorListIterator.java	1 Oct 2003 21:54:55 -0000	1.6
  @@ -64,7 +64,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestListIterator;
  +import org.apache.commons.collections.iterators.AbstractTestListIterator;
   import org.apache.commons.collections.primitives.ArrayIntList;
   import org.apache.commons.collections.primitives.IntList;
   
  @@ -72,7 +72,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestIntListIteratorListIterator extends TestListIterator {
  +public class TestIntListIteratorListIterator extends AbstractTestListIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -88,10 +88,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public ListIterator makeEmptyListIterator() {
           return IntListIteratorListIterator.wrap(makeEmptyIntList().listIterator());
       }
  @@ -117,6 +113,10 @@
           return new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
       }
       
  +    protected Object addSetValue() {
  +        return new Integer(1);
  +    }
  +
       // tests
       // ------------------------------------------------------------------------
   
  
  
  
  1.3       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestDoubleListIteratorListIterator.java
  
  Index: TestDoubleListIteratorListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestDoubleListIteratorListIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestDoubleListIteratorListIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestDoubleListIteratorListIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -64,7 +64,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestListIterator;
  +import org.apache.commons.collections.iterators.AbstractTestListIterator;
   import org.apache.commons.collections.primitives.ArrayDoubleList;
   import org.apache.commons.collections.primitives.DoubleList;
   
  @@ -72,7 +72,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestDoubleListIteratorListIterator extends TestListIterator {
  +public class TestDoubleListIteratorListIterator extends AbstractTestListIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -88,10 +88,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public ListIterator makeEmptyListIterator() {
           return DoubleListIteratorListIterator.wrap(makeEmptyDoubleList().listIterator());
       }
  @@ -117,6 +113,10 @@
           return new double[] { (double)0, (double)1, (double)2, (double)3, (double)4, (double)5, (double)6, (double)7, (double)8, (double)9 };
       }
       
  +    protected Object addSetValue() {
  +        return new Double((double)1);
  +    }
  +
       // tests
       // ------------------------------------------------------------------------
   
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestDoubleIteratorIterator.java
  
  Index: TestDoubleIteratorIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestDoubleIteratorIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestDoubleIteratorIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestDoubleIteratorIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -62,7 +62,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.ArrayDoubleList;
   import org.apache.commons.collections.primitives.DoubleList;
   
  @@ -70,7 +70,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestDoubleIteratorIterator extends TestIterator {
  +public class TestDoubleIteratorIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -86,10 +86,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return DoubleIteratorIterator.wrap(makeEmptyDoubleList().iterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestByteIteratorIterator.java
  
  Index: TestByteIteratorIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestByteIteratorIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestByteIteratorIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestByteIteratorIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -62,7 +62,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.ArrayByteList;
   import org.apache.commons.collections.primitives.ByteList;
   
  @@ -70,7 +70,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestByteIteratorIterator extends TestIterator {
  +public class TestByteIteratorIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -86,10 +86,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return ByteIteratorIterator.wrap(makeEmptyByteList().iterator());
       }
  
  
  
  1.4       +8 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestShortListIteratorListIterator.java
  
  Index: TestShortListIteratorListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestShortListIteratorListIterator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestShortListIteratorListIterator.java	31 Aug 2003 17:28:38 -0000	1.3
  +++ TestShortListIteratorListIterator.java	1 Oct 2003 21:54:55 -0000	1.4
  @@ -64,7 +64,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestListIterator;
  +import org.apache.commons.collections.iterators.AbstractTestListIterator;
   import org.apache.commons.collections.primitives.ArrayShortList;
   import org.apache.commons.collections.primitives.ShortList;
   
  @@ -72,7 +72,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestShortListIteratorListIterator extends TestListIterator {
  +public class TestShortListIteratorListIterator extends AbstractTestListIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -88,10 +88,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public ListIterator makeEmptyListIterator() {
           return ShortListIteratorListIterator.wrap(makeEmptyShortList().listIterator());
       }
  @@ -117,6 +113,10 @@
           return new short[] { (short)0, (short)1, (short)2, (short)3, (short)4, (short)5, (short)6, (short)7, (short)8, (short)9 };
       }
       
  +    protected Object addSetValue() {
  +        return new Short((short)1);
  +    }
  +
       // tests
       // ------------------------------------------------------------------------
   
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestCharIteratorIterator.java
  
  Index: TestCharIteratorIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestCharIteratorIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestCharIteratorIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestCharIteratorIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -62,7 +62,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.ArrayCharList;
   import org.apache.commons.collections.primitives.CharList;
   
  @@ -70,7 +70,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestCharIteratorIterator extends TestIterator {
  +public class TestCharIteratorIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -86,10 +86,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return CharIteratorIterator.wrap(makeEmptyCharList().iterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestLongIteratorIterator.java
  
  Index: TestLongIteratorIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/adapters/TestLongIteratorIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestLongIteratorIterator.java	31 Aug 2003 17:28:38 -0000	1.2
  +++ TestLongIteratorIterator.java	1 Oct 2003 21:54:55 -0000	1.3
  @@ -62,7 +62,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.ArrayLongList;
   import org.apache.commons.collections.primitives.LongList;
   
  @@ -70,7 +70,7 @@
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public class TestLongIteratorIterator extends TestIterator {
  +public class TestLongIteratorIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -86,10 +86,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    public Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return LongIteratorIterator.wrap(makeEmptyLongList().iterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestLongIterator.java
  
  Index: TestLongIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestLongIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestLongIterator.java	31 Aug 2003 17:28:41 -0000	1.2
  +++ TestLongIterator.java	1 Oct 2003 21:54:56 -0000	1.3
  @@ -60,14 +60,14 @@
   import java.util.Iterator;
   import java.util.NoSuchElementException;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.adapters.LongIteratorIterator;
   
   /**
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public abstract class TestLongIterator extends TestIterator {
  +public abstract class TestLongIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -79,10 +79,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    protected Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return LongIteratorIterator.wrap(makeEmptyLongIterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestFloatIterator.java
  
  Index: TestFloatIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestFloatIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestFloatIterator.java	31 Aug 2003 17:28:41 -0000	1.2
  +++ TestFloatIterator.java	1 Oct 2003 21:54:56 -0000	1.3
  @@ -60,14 +60,14 @@
   import java.util.Iterator;
   import java.util.NoSuchElementException;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.adapters.FloatIteratorIterator;
   
   /**
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public abstract class TestFloatIterator extends TestIterator {
  +public abstract class TestFloatIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -79,10 +79,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    protected Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return FloatIteratorIterator.wrap(makeEmptyFloatIterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestCharIterator.java
  
  Index: TestCharIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestCharIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestCharIterator.java	31 Aug 2003 17:28:41 -0000	1.2
  +++ TestCharIterator.java	1 Oct 2003 21:54:56 -0000	1.3
  @@ -60,14 +60,14 @@
   import java.util.Iterator;
   import java.util.NoSuchElementException;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.adapters.CharIteratorIterator;
   
   /**
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public abstract class TestCharIterator extends TestIterator {
  +public abstract class TestCharIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -79,10 +79,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    protected Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return CharIteratorIterator.wrap(makeEmptyCharIterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestShortIterator.java
  
  Index: TestShortIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestShortIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestShortIterator.java	31 Aug 2003 17:28:41 -0000	1.2
  +++ TestShortIterator.java	1 Oct 2003 21:54:56 -0000	1.3
  @@ -60,14 +60,14 @@
   import java.util.Iterator;
   import java.util.NoSuchElementException;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.adapters.ShortIteratorIterator;
   
   /**
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public abstract class TestShortIterator extends TestIterator {
  +public abstract class TestShortIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -79,10 +79,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    protected Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return ShortIteratorIterator.wrap(makeEmptyShortIterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestDoubleIterator.java
  
  Index: TestDoubleIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestDoubleIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestDoubleIterator.java	31 Aug 2003 17:28:40 -0000	1.2
  +++ TestDoubleIterator.java	1 Oct 2003 21:54:56 -0000	1.3
  @@ -60,14 +60,14 @@
   import java.util.Iterator;
   import java.util.NoSuchElementException;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.adapters.DoubleIteratorIterator;
   
   /**
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public abstract class TestDoubleIterator extends TestIterator {
  +public abstract class TestDoubleIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -79,10 +79,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    protected Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return DoubleIteratorIterator.wrap(makeEmptyDoubleIterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestByteIterator.java
  
  Index: TestByteIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestByteIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestByteIterator.java	31 Aug 2003 17:28:40 -0000	1.2
  +++ TestByteIterator.java	1 Oct 2003 21:54:56 -0000	1.3
  @@ -60,14 +60,14 @@
   import java.util.Iterator;
   import java.util.NoSuchElementException;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.adapters.ByteIteratorIterator;
   
   /**
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public abstract class TestByteIterator extends TestIterator {
  +public abstract class TestByteIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -79,10 +79,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    protected Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return ByteIteratorIterator.wrap(makeEmptyByteIterator());
       }
  
  
  
  1.3       +4 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestIntIterator.java
  
  Index: TestIntIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/primitives/TestIntIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestIntIterator.java	31 Aug 2003 17:28:41 -0000	1.2
  +++ TestIntIterator.java	1 Oct 2003 21:54:56 -0000	1.3
  @@ -60,14 +60,14 @@
   import java.util.Iterator;
   import java.util.NoSuchElementException;
   
  -import org.apache.commons.collections.iterators.TestIterator;
  +import org.apache.commons.collections.iterators.AbstractTestIterator;
   import org.apache.commons.collections.primitives.adapters.IntIteratorIterator;
   
   /**
    * @version $Revision$ $Date$
    * @author Rodney Waldhoff
    */
  -public abstract class TestIntIterator extends TestIterator {
  +public abstract class TestIntIterator extends AbstractTestIterator {
   
       // conventional
       // ------------------------------------------------------------------------
  @@ -79,10 +79,6 @@
       // collections testing framework
       // ------------------------------------------------------------------------
   
  -    protected Object makeObject() {
  -        return makeFullIterator();
  -    }
  -    
       public Iterator makeEmptyIterator() {
           return IntIteratorIterator.wrap(makeEmptyIntIterator());
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message