You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2003/10/05 23:03:45 UTC

cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestBufferUtils.java TestArrayStack.java TestBagUtils.java TestCollectionUtils.java TestBoundedFifoBuffer.java TestArrayList.java LocalTestNode.java TestBinaryHeap.java TestAllPackages.java TestAll.java TestBoundedFifoBuffer2.java

scolebourne    2003/10/05 14:03:45

  Modified:    collections/src/test/org/apache/commons/collections
                        TestBufferUtils.java TestArrayStack.java
                        TestBagUtils.java TestCollectionUtils.java
                        TestBoundedFifoBuffer.java TestArrayList.java
                        LocalTestNode.java TestBinaryHeap.java
                        TestAllPackages.java TestAll.java
                        TestBoundedFifoBuffer2.java
  Log:
  Update licence and version
  
  Revision  Changes    Path
  1.8       +8 -11     jakarta-commons/collections/src/test/org/apache/commons/collections/TestBufferUtils.java
  
  Index: TestBufferUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBufferUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestBufferUtils.java	2 Oct 2003 22:14:28 -0000	1.7
  +++ TestBufferUtils.java	5 Oct 2003 21:03:44 -0000	1.8
  @@ -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,7 +65,11 @@
   import org.apache.commons.collections.decorators.PredicatedBuffer;
   
   /**
  - *  Tests for BufferUtils.
  + * Tests for BufferUtils.
  + * 
  + * @version $Revision$ $Date$
  + * 
  + * @author Unknown
    */
   public class TestBufferUtils extends BulkTest {
   
  @@ -141,8 +142,4 @@
   
           };
       }
  -
  -
   }
  -
  -
  
  
  
  1.10      +10 -14    jakarta-commons/collections/src/test/org/apache/commons/collections/TestArrayStack.java
  
  Index: TestArrayStack.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestArrayStack.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestArrayStack.java	31 Aug 2003 17:28:43 -0000	1.9
  +++ TestArrayStack.java	5 Oct 2003 21:03:44 -0000	1.10
  @@ -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;
   
   import java.util.EmptyStackException;
  @@ -67,11 +63,15 @@
   import junit.framework.Test;
   
   /**
  + * Tests ArrayStack.
  + * 
  + * @version $Revision$ $Date$
  + * 
    * @author Craig McClanahan
  - * @version $Id$
    */
  -
   public class TestArrayStack extends TestArrayList {
  +    
  +    protected ArrayStack stack = null;
   
       public TestArrayStack(String testName) {
           super(testName);
  @@ -90,13 +90,12 @@
           return new ArrayStack();
       }
   
  -    protected ArrayStack stack = null;
  -
       public void setUp() {
           stack = (ArrayStack) makeEmptyList();
           list = stack;
       }
   
  +    //-----------------------------------------------------------------------
       public void testNewStack() {
   
           assertTrue("New stack is empty", stack.empty());
  @@ -118,7 +117,6 @@
   
       }
   
  -
       public void testPushPeekPop() {
   
           stack.push("First Item");
  @@ -146,7 +144,6 @@
   
       }
   
  -
       public void testSearch() {
   
           stack.push("First Item");
  @@ -159,6 +156,5 @@
                        stack.search("Missing Item"), -1);
   
       }
  -
   
   }
  
  
  
  1.3       +5 -6      jakarta-commons/collections/src/test/org/apache/commons/collections/TestBagUtils.java
  
  Index: TestBagUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBagUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestBagUtils.java	20 Sep 2003 17:02:03 -0000	1.2
  +++ TestBagUtils.java	5 Oct 2003 21:03:44 -0000	1.3
  @@ -1,11 +1,10 @@
   /*
    * $Header$
  - *
    * ====================================================================
    *
    * 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
  @@ -34,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
  @@ -71,10 +70,10 @@
   
   /**
    * Tests for BagUtils factory methods.
  - *
  - * @author Phil Steitz
    * 
    * @version $Revision$ $Date$
  + *
  + * @author Phil Steitz
    */
   public class TestBagUtils extends BulkTest {
   
  
  
  
  1.25      +6 -9      jakarta-commons/collections/src/test/org/apache/commons/collections/TestCollectionUtils.java
  
  Index: TestCollectionUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestCollectionUtils.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- TestCollectionUtils.java	5 Oct 2003 19:48:00 -0000	1.24
  +++ TestCollectionUtils.java	5 Oct 2003 21:03:44 -0000	1.25
  @@ -1,13 +1,10 @@
   /*
  - * $Id$
  - * $Revision$
  - * $Date$
  - *
  + * $Header$
    * ====================================================================
    *
    * 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
  @@ -58,7 +55,6 @@
    * <http://www.apache.org/>.
    *
    */
  -
   package org.apache.commons.collections;
   
   import java.util.ArrayList;
  @@ -96,6 +92,7 @@
    * @version $Revision$ $Date$
    */
   public class TestCollectionUtils extends TestCase {
  +    
       public TestCollectionUtils(String testName) {
           super(testName);
       }
  @@ -642,7 +639,7 @@
           
           // list, non-existent entry -- IndexOutOfBoundsException
           try {
  -            test = CollectionUtils.index(list, 2);
  +            test = CollectionUtils.get(list, 2);
               fail("Expecting IndexOutOfBoundsException");
           } catch (IndexOutOfBoundsException e) {
               // expected
  
  
  
  1.9       +5 -3      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestBoundedFifoBuffer.java	2 Oct 2003 22:14:29 -0000	1.8
  +++ TestBoundedFifoBuffer.java	5 Oct 2003 21:03:44 -0000	1.9
  @@ -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
  @@ -33,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,6 +65,8 @@
   
   /**
    * Test cases for BoundedFifoBuffer.
  + * 
  + * @version $Revision$ $Date$
    * 
    * @author Paul Jack
    */
  
  
  
  1.9       +22 -31    jakarta-commons/collections/src/test/org/apache/commons/collections/TestArrayList.java
  
  Index: TestArrayList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestArrayList.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestArrayList.java	2 Oct 2003 22:14:29 -0000	1.8
  +++ TestArrayList.java	5 Oct 2003 21:03:44 -0000	1.9
  @@ -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;
   
   import java.util.ArrayList;
  @@ -67,52 +63,47 @@
   import junit.framework.TestSuite;
   
   /**
  - * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
  - * @version $Id$
  + * Abstract test class for ArrayList.
  + * 
  + * @version $Revision$ $Date$
  + * 
  + * @author Jason van Zyl
    */
  -public abstract class TestArrayList extends AbstractTestList
  -{
  -    public TestArrayList(String testName)
  -    {
  +public abstract class TestArrayList extends AbstractTestList {
  +    
  +    protected ArrayList list = null;
  +    
  +    public TestArrayList(String testName) {
           super(testName);
       }
   
  -    public static Test suite()
  -    {
  +    public static Test suite() {
           return new TestSuite(TestArrayList.class);
       }
   
  -    public static void main(String args[])
  -    {
  -        String[] testCaseName = { TestArrayList.class.getName() };
  +    public static void main(String args[]) {
  +        String[] testCaseName = { TestArrayList.class.getName()};
           junit.textui.TestRunner.main(testCaseName);
       }
   
  -    protected ArrayList list = null;
  -
  -    public void setUp()
  -    {
  +    public void setUp() {
           list = (ArrayList) makeEmptyList();
       }
   
  -    public void testNewArrayList()
  -    {
  +    //-----------------------------------------------------------------------
  +    public void testNewArrayList() {
           assertTrue("New list is empty", list.isEmpty());
           assertEquals("New list has size zero", list.size(), 0);
   
  -        try
  -        {
  +        try {
               list.get(1);
               fail("get(int i) should have thrown IndexOutOfBoundsException");
  -        }
  -        catch (IndexOutOfBoundsException e)
  -        {
  +        } catch (IndexOutOfBoundsException e) {
               ; // Expected result
           }
       }
   
  -    public void testSearch()
  -    {
  +    public void testSearch() {
           list.add("First Item");
           list.add("Last Item");
           assertEquals("First item is 'First Item'", list.get(0), "First Item");
  
  
  
  1.3       +9 -15     jakarta-commons/collections/src/test/org/apache/commons/collections/LocalTestNode.java
  
  Index: LocalTestNode.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/LocalTestNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalTestNode.java	31 Aug 2003 17:28:43 -0000	1.2
  +++ LocalTestNode.java	5 Oct 2003 21:03:44 -0000	1.3
  @@ -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) 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,18 +55,15 @@
    * <http://www.apache.org/>.
    *
    */
  -
   package org.apache.commons.collections;
   
  -
  -
   /**
  -* Class LocalTestNode
  -*
  -* a helper class for TestDoubleOrderedMap
  -*
  -* @author Marc Johnson (marcj at users dot sourceforge dot net)
  -*/
  + * Class LocalTestNode, a helper class for TestDoubleOrderedMap
  + * 
  + * @version $Revision$ $Date$
  + *
  + * @author Marc Johnson (marcj at users dot sourceforge dot net)
  + */
   class LocalTestNode implements Comparable {
   
       private Comparable key;
  
  
  
  1.11      +6 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/TestBinaryHeap.java
  
  Index: TestBinaryHeap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBinaryHeap.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestBinaryHeap.java	2 Oct 2003 22:14:29 -0000	1.10
  +++ TestBinaryHeap.java	5 Oct 2003 21:03:44 -0000	1.11
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 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
  @@ -75,8 +72,9 @@
   /**
    * Tests the BinaryHeap.
    * 
  - * @author <a href="mailto:mas@apache.org">Michael A. Smith</a>
  - * @version $Id$
  + * @version $Revision$ $Date$
  + * 
  + * @author Michael A. Smith
    */
   public class TestBinaryHeap extends AbstractTestCollection {
   
  
  
  
  1.5       +3 -3      jakarta-commons/collections/src/test/org/apache/commons/collections/TestAllPackages.java
  
  Index: TestAllPackages.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestAllPackages.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestAllPackages.java	1 Oct 2003 22:36:49 -0000	1.4
  +++ TestAllPackages.java	5 Oct 2003 21:03:44 -0000	1.5
  @@ -4,7 +4,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 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
  
  
  
  1.49      +2 -2      jakarta-commons/collections/src/test/org/apache/commons/collections/TestAll.java
  
  Index: TestAll.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestAll.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  
  
  
  1.6       +7 -8      jakarta-commons/collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java
  
  Index: TestBoundedFifoBuffer2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestBoundedFifoBuffer2.java	31 Aug 2003 17:28:43 -0000	1.5
  +++ TestBoundedFifoBuffer2.java	5 Oct 2003 21:03:44 -0000	1.6
  @@ -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) 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
  @@ -60,16 +57,18 @@
    */
   package org.apache.commons.collections;
   
  -
   import java.util.Arrays;
   import java.util.Collection;
   
   import junit.framework.Test;
   
  -
   /**
    * Runs tests against a full BoundedFifoBuffer, since many of the algorithms
    * differ depending on whether the fifo is full or not.
  + * 
  + * @version $Revision$ $Date$
  + * 
  + * @author Unknown
    */
   public class TestBoundedFifoBuffer2 extends TestBoundedFifoBuffer {
   
  
  
  

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