diff --git a/src/test/org/apache/commons/collections/LocalTestNode.java b/src/test/org/apache/commons/collections/LocalTestNode.java index d611c2e6c..20028d8c1 100644 --- a/src/test/org/apache/commons/collections/LocalTestNode.java +++ b/src/test/org/apache/commons/collections/LocalTestNode.java @@ -1,13 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/LocalTestNode.java,v 1.2 2003/08/31 17:28:43 scolebourne Exp $ - * $Revision: 1.2 $ - * $Date: 2003/08/31 17:28:43 $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/LocalTestNode.java,v 1.3 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 @@ * . * */ - 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: 1.3 $ $Date: 2003/10/05 21:03:44 $ + * + * @author Marc Johnson (marcj at users dot sourceforge dot net) + */ class LocalTestNode implements Comparable { private Comparable key; diff --git a/src/test/org/apache/commons/collections/TestAll.java b/src/test/org/apache/commons/collections/TestAll.java index f0877b6de..2c13b48cd 100644 --- a/src/test/org/apache/commons/collections/TestAll.java +++ b/src/test/org/apache/commons/collections/TestAll.java @@ -1,5 +1,5 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAll.java,v 1.48 2003/09/23 20:29:34 matth Exp $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAll.java,v 1.49 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * The Apache Software License, Version 1.1 @@ -64,7 +64,7 @@ import junit.framework.TestSuite; /** * Entry point for all Collections package tests. * - * @version $Revision: 1.48 $ $Date: 2003/09/23 20:29:34 $ + * @version $Revision: 1.49 $ $Date: 2003/10/05 21:03:44 $ * * @author Rodney Waldhoff * @author Stephen Colebourne diff --git a/src/test/org/apache/commons/collections/TestAllPackages.java b/src/test/org/apache/commons/collections/TestAllPackages.java index e9b720055..ed84307a7 100644 --- a/src/test/org/apache/commons/collections/TestAllPackages.java +++ b/src/test/org/apache/commons/collections/TestAllPackages.java @@ -1,10 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAllPackages.java,v 1.4 2003/10/01 22:36:49 scolebourne Exp $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAllPackages.java,v 1.5 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 @@ -64,7 +64,7 @@ import junit.framework.TestSuite; /** * Entry point for all Collections project tests. * - * @version $Revision: 1.4 $ $Date: 2003/10/01 22:36:49 $ + * @version $Revision: 1.5 $ $Date: 2003/10/05 21:03:44 $ * * @author Stephen Colebourne */ diff --git a/src/test/org/apache/commons/collections/TestArrayList.java b/src/test/org/apache/commons/collections/TestArrayList.java index fb85d9f13..517d91897 100644 --- a/src/test/org/apache/commons/collections/TestArrayList.java +++ b/src/test/org/apache/commons/collections/TestArrayList.java @@ -1,13 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayList.java,v 1.8 2003/10/02 22:14:29 scolebourne Exp $ - * $Revision: 1.8 $ - * $Date: 2003/10/02 22:14:29 $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayList.java,v 1.9 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 @@ * . * */ - package org.apache.commons.collections; import java.util.ArrayList; @@ -67,52 +63,47 @@ import junit.framework.Test; import junit.framework.TestSuite; /** - * @author Jason van Zyl - * @version $Id: TestArrayList.java,v 1.8 2003/10/02 22:14:29 scolebourne Exp $ + * Abstract test class for ArrayList. + * + * @version $Revision: 1.9 $ $Date: 2003/10/05 21:03:44 $ + * + * @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"); diff --git a/src/test/org/apache/commons/collections/TestArrayStack.java b/src/test/org/apache/commons/collections/TestArrayStack.java index e070077d8..7a5aecb7e 100644 --- a/src/test/org/apache/commons/collections/TestArrayStack.java +++ b/src/test/org/apache/commons/collections/TestArrayStack.java @@ -1,13 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayStack.java,v 1.9 2003/08/31 17:28:43 scolebourne Exp $ - * $Revision: 1.9 $ - * $Date: 2003/08/31 17:28:43 $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayStack.java,v 1.10 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 @@ * . * */ - package org.apache.commons.collections; import java.util.EmptyStackException; @@ -67,11 +63,15 @@ import java.util.List; import junit.framework.Test; /** + * Tests ArrayStack. + * + * @version $Revision: 1.10 $ $Date: 2003/10/05 21:03:44 $ + * * @author Craig McClanahan - * @version $Id: TestArrayStack.java,v 1.9 2003/08/31 17:28:43 scolebourne Exp $ */ - public class TestArrayStack extends TestArrayList { + + protected ArrayStack stack = null; public TestArrayStack(String testName) { super(testName); @@ -90,13 +90,12 @@ public class TestArrayStack extends TestArrayList { 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 class TestArrayStack extends TestArrayList { } - public void testPushPeekPop() { stack.push("First Item"); @@ -146,7 +144,6 @@ public class TestArrayStack extends TestArrayList { } - public void testSearch() { stack.push("First Item"); @@ -160,5 +157,4 @@ public class TestArrayStack extends TestArrayList { } - } diff --git a/src/test/org/apache/commons/collections/TestBagUtils.java b/src/test/org/apache/commons/collections/TestBagUtils.java index 4a763d787..ec1fb1a73 100644 --- a/src/test/org/apache/commons/collections/TestBagUtils.java +++ b/src/test/org/apache/commons/collections/TestBagUtils.java @@ -1,11 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBagUtils.java,v 1.2 2003/09/20 17:02:03 scolebourne Exp $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBagUtils.java,v 1.3 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 @@ import org.apache.commons.collections.decorators.UnmodifiableSortedBag; /** * Tests for BagUtils factory methods. + * + * @version $Revision: 1.3 $ $Date: 2003/10/05 21:03:44 $ * * @author Phil Steitz - * - * @version $Revision: 1.2 $ $Date: 2003/09/20 17:02:03 $ */ public class TestBagUtils extends BulkTest { diff --git a/src/test/org/apache/commons/collections/TestBinaryHeap.java b/src/test/org/apache/commons/collections/TestBinaryHeap.java index e3e32c14d..b2741176b 100644 --- a/src/test/org/apache/commons/collections/TestBinaryHeap.java +++ b/src/test/org/apache/commons/collections/TestBinaryHeap.java @@ -1,13 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBinaryHeap.java,v 1.10 2003/10/02 22:14:29 scolebourne Exp $ - * $Revision: 1.10 $ - * $Date: 2003/10/02 22:14:29 $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBinaryHeap.java,v 1.11 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 @@ import org.apache.commons.collections.comparators.ReverseComparator; /** * Tests the BinaryHeap. * - * @author Michael A. Smith - * @version $Id: TestBinaryHeap.java,v 1.10 2003/10/02 22:14:29 scolebourne Exp $ + * @version $Revision: 1.11 $ $Date: 2003/10/05 21:03:44 $ + * + * @author Michael A. Smith */ public class TestBinaryHeap extends AbstractTestCollection { diff --git a/src/test/org/apache/commons/collections/TestBoundedFifoBuffer.java b/src/test/org/apache/commons/collections/TestBoundedFifoBuffer.java index 97415e521..d68248e25 100644 --- a/src/test/org/apache/commons/collections/TestBoundedFifoBuffer.java +++ b/src/test/org/apache/commons/collections/TestBoundedFifoBuffer.java @@ -1,10 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer.java,v 1.8 2003/10/02 22:14:29 scolebourne Exp $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer.java,v 1.9 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 @@ -66,6 +66,8 @@ import junit.framework.Test; /** * Test cases for BoundedFifoBuffer. * + * @version $Revision: 1.9 $ $Date: 2003/10/05 21:03:44 $ + * * @author Paul Jack */ public class TestBoundedFifoBuffer extends AbstractTestCollection { diff --git a/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java b/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java index 3c45cb17d..f10d7f46d 100644 --- a/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java +++ b/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java @@ -1,13 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java,v 1.5 2003/08/31 17:28:43 scolebourne Exp $ - * $Revision: 1.5 $ - * $Date: 2003/08/31 17:28:43 $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java,v 1.6 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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: 1.6 $ $Date: 2003/10/05 21:03:44 $ + * + * @author Unknown */ public class TestBoundedFifoBuffer2 extends TestBoundedFifoBuffer { diff --git a/src/test/org/apache/commons/collections/TestBufferUtils.java b/src/test/org/apache/commons/collections/TestBufferUtils.java index 4d4876fe3..480215f8a 100644 --- a/src/test/org/apache/commons/collections/TestBufferUtils.java +++ b/src/test/org/apache/commons/collections/TestBufferUtils.java @@ -1,13 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBufferUtils.java,v 1.7 2003/10/02 22:14:28 scolebourne Exp $ - * $Revision: 1.7 $ - * $Date: 2003/10/02 22:14:28 $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBufferUtils.java,v 1.8 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 junit.framework.Test; import org.apache.commons.collections.decorators.PredicatedBuffer; /** - * Tests for BufferUtils. + * Tests for BufferUtils. + * + * @version $Revision: 1.8 $ $Date: 2003/10/05 21:03:44 $ + * + * @author Unknown */ public class TestBufferUtils extends BulkTest { @@ -141,8 +142,4 @@ public class TestBufferUtils extends BulkTest { }; } - - } - - diff --git a/src/test/org/apache/commons/collections/TestCollectionUtils.java b/src/test/org/apache/commons/collections/TestCollectionUtils.java index 2591cadc4..0affef58a 100644 --- a/src/test/org/apache/commons/collections/TestCollectionUtils.java +++ b/src/test/org/apache/commons/collections/TestCollectionUtils.java @@ -1,13 +1,10 @@ /* - * $Id: TestCollectionUtils.java,v 1.24 2003/10/05 19:48:00 psteitz Exp $ - * $Revision: 1.24 $ - * $Date: 2003/10/05 19:48:00 $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestCollectionUtils.java,v 1.25 2003/10/05 21:03:44 scolebourne Exp $ * ==================================================================== * * 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 @@ * . * */ - package org.apache.commons.collections; import java.util.ArrayList; @@ -93,9 +89,10 @@ import org.apache.commons.collections.decorators.UnmodifiableCollection; * @author Stephen Colebourne * @author Phil Steitz * - * @version $Revision: 1.24 $ $Date: 2003/10/05 19:48:00 $ + * @version $Revision: 1.25 $ $Date: 2003/10/05 21:03:44 $ */ public class TestCollectionUtils extends TestCase { + public TestCollectionUtils(String testName) { super(testName); } @@ -642,7 +639,7 @@ public class TestCollectionUtils extends TestCase { // list, non-existent entry -- IndexOutOfBoundsException try { - test = CollectionUtils.index(list, 2); + test = CollectionUtils.get(list, 2); fail("Expecting IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException e) { // expected