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/list AbstractTestList.java
Date Wed, 24 Dec 2003 01:13:13 GMT
scolebourne    2003/12/23 17:13:13

  Modified:    collections/src/test/org/apache/commons/collections/list
                        AbstractTestList.java
  Log:
  Make use of proper list iterator tests
  
  Revision  Changes    Path
  1.4       +40 -2     jakarta-commons/collections/src/test/org/apache/commons/collections/list/AbstractTestList.java
  
  Index: AbstractTestList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/list/AbstractTestList.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractTestList.java	11 Dec 2003 00:16:02 -0000	1.3
  +++ AbstractTestList.java	24 Dec 2003 01:13:13 -0000	1.4
  @@ -74,6 +74,7 @@
   
   import org.apache.commons.collections.BulkTest;
   import org.apache.commons.collections.collection.AbstractTestCollection;
  +import org.apache.commons.collections.iterators.AbstractTestListIterator;
   
   /**
    * Abstract test class for {@link java.util.List} methods and contracts.
  @@ -1225,4 +1226,41 @@
          }
      }
   
  +   //-----------------------------------------------------------------------
  +   public BulkTest bulkTestListIterator() {
  +       return new TestListIterator();
  +   }
  +    
  +   public class TestListIterator extends AbstractTestListIterator {
  +       public TestListIterator() {
  +           super("TestListIterator");
  +       }
  +        
  +       public Object addSetValue() {
  +           return AbstractTestList.this.getOtherElements()[0];
  +       }
  +        
  +       public boolean supportsRemove() {
  +           return AbstractTestList.this.isRemoveSupported();
  +       }
  +
  +       public boolean supportsAdd() {
  +           return AbstractTestList.this.isAddSupported();
  +       }
  +
  +       public boolean supportsSet() {
  +           return AbstractTestList.this.isSetSupported();
  +       }
  +
  +       public ListIterator makeEmptyListIterator() {
  +           resetEmpty();
  +           return ((List) AbstractTestList.this.collection).listIterator();
  +       }
  +
  +       public ListIterator makeFullListIterator() {
  +           resetFull();
  +           return ((List) AbstractTestList.this.collection).listIterator();
  +       }
  +   }
  +    
   }
  
  
  

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