commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morg...@apache.org
Subject cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestIterator.java
Date Mon, 25 Feb 2002 23:26:25 GMT
morgand     02/02/25 15:26:25

  Modified:    collections/src/test/org/apache/commons/collections
                        TestIterator.java
  Log:
  more details for hasNext() testing
  
  Revision  Changes    Path
  1.3       +7 -3      jakarta-commons/collections/src/test/org/apache/commons/collections/TestIterator.java
  
  Index: TestIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestIterator.java	25 Feb 2002 22:48:52 -0000	1.2
  +++ TestIterator.java	25 Feb 2002 23:26:25 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestIterator.java,v
1.2 2002/02/25 22:48:52 morgand Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/02/25 22:48:52 $
  + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestIterator.java,v
1.3 2002/02/25 23:26:25 morgand Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/02/25 23:26:25 $
    *
    * ====================================================================
    *
  @@ -85,6 +85,7 @@
        */
       public void testEmptyIterator() {
           Iterator iter = makeEmptyIterator();
  +        assertTrue("hasNext() should return false for empty iterators",iter.hasNext() ==
false);
           try {
   	    iter.next();
               fail("NoSuchElementException must be thrown when Iterator is exhausted");
  @@ -100,6 +101,9 @@
        */
       public void testFullIterator() {
           Iterator iter = makeFullIterator();
  +
  +        assertTrue("hasNext() should return true for at least one element",iter.hasNext());
  +
           try {
   	    iter.next();
   	} catch (NoSuchElementException e) {
  
  
  

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


Mime
View raw message