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 TestBoundedFifoBuffer.java
Date Sat, 26 Apr 2003 15:12:28 GMT
scolebourne    2003/04/26 08:12:28

  Modified:    collections/src/test/org/apache/commons/collections
                        TestBoundedFifoBuffer.java
  Log:
  Add additional test for null passed to constructor
  
  Revision  Changes    Path
  1.5       +18 -12    jakarta-commons/collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer.java
  
  Index: TestBoundedFifoBuffer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestBoundedFifoBuffer.java	19 Feb 2003 20:33:11 -0000	1.4
  +++ TestBoundedFifoBuffer.java	26 Apr 2003 15:12:28 -0000	1.5
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,8 +62,11 @@
   import java.util.Iterator;
   
   import junit.framework.Test;
  +
   /**
  - *  Test cases for BoundedFifoBuffer.
  + * Test cases for BoundedFifoBuffer.
  + * 
  + * @author Paul Jack
    */
   public class TestBoundedFifoBuffer extends TestCollection {
   
  @@ -87,8 +87,6 @@
           return new BoundedFifoBuffer(100);
       }
   
  -
  -
       /**
        *  Returns an empty ArrayList.
        *
  @@ -98,7 +96,6 @@
           return new ArrayList();
       }
   
  -
       /**
        *  Returns a full ArrayList.
        *
  @@ -110,7 +107,6 @@
           return c;
       }
   
  -
       /**
        *  Overridden because BoundedFifoBuffer doesn't support null elements.
        *
  @@ -120,14 +116,12 @@
           return getFullNonNullElements();
       }
   
  -
       /**
        *  Overridden, because BoundedFifoBuffer's iterators aren't fail-fast.
        */
       public void testCollectionIteratorFailFast() {
       }
   
  -
       /**
        *  Runs through the regular verifications, but also verifies that 
        *  the buffer contains the same elements in the same sequence as the
  @@ -185,6 +179,18 @@
           try {
               new BoundedFifoBuffer(-20);
           } catch (IllegalArgumentException ex) {
  +            return;
  +        }
  +        fail();
  +    }
  +
  +    /**
  +     * Tests that the constructor correctly throws an exception.
  +     */
  +    public void testConstructorException3() {
  +        try {
  +            new BoundedFifoBuffer(null);
  +        } catch (NullPointerException ex) {
               return;
           }
           fail();
  
  
  

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