Update licence and version

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2003-10-05 21:03:44 +00:00
parent 0672fd080f
commit 96c2adf196
11 changed files with 83 additions and 110 deletions

View File

@ -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,15 +55,12 @@
* <http://www.apache.org/>.
*
*/
package org.apache.commons.collections;
/**
* Class LocalTestNode
* Class LocalTestNode, a helper class for TestDoubleOrderedMap
*
* 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)
*/

View File

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

View File

@ -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
*/

View File

@ -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 @@
* <http://www.apache.org/>.
*
*/
package org.apache.commons.collections;
import java.util.ArrayList;
@ -67,52 +63,47 @@ import junit.framework.Test;
import junit.framework.TestSuite;
/**
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
* @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[])
{
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");

View File

@ -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 @@
* <http://www.apache.org/>.
*
*/
package org.apache.commons.collections;
import java.util.EmptyStackException;
@ -67,12 +63,16 @@ 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 {
}
}

View File

@ -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
@ -72,9 +71,9 @@ import org.apache.commons.collections.decorators.UnmodifiableSortedBag;
/**
* Tests for BagUtils factory methods.
*
* @author Phil Steitz
* @version $Revision: 1.3 $ $Date: 2003/10/05 21:03:44 $
*
* @version $Revision: 1.2 $ $Date: 2003/09/20 17:02:03 $
* @author Phil Steitz
*/
public class TestBagUtils extends BulkTest {

View File

@ -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 <a href="mailto:mas@apache.org">Michael A. Smith</a>
* @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 {

View File

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

View File

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

View File

@ -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
@ -69,6 +66,10 @@ import org.apache.commons.collections.decorators.PredicatedBuffer;
/**
* 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 {
};
}
}

View File

@ -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 @@
* <http://www.apache.org/>.
*
*/
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