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:
parent
0672fd080f
commit
96c2adf196
|
@ -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 $
|
* $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 $
|
||||||
* $Revision: 1.2 $
|
|
||||||
* $Date: 2003/08/31 17:28:43 $
|
|
||||||
*
|
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
* The Apache Software License, Version 1.1
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
@ -58,18 +55,15 @@
|
||||||
* <http://www.apache.org/>.
|
* <http://www.apache.org/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.commons.collections;
|
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)
|
* @author Marc Johnson (marcj at users dot sourceforge dot net)
|
||||||
*/
|
*/
|
||||||
class LocalTestNode implements Comparable {
|
class LocalTestNode implements Comparable {
|
||||||
|
|
||||||
private Comparable key;
|
private Comparable key;
|
||||||
|
|
|
@ -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
|
* The Apache Software License, Version 1.1
|
||||||
|
@ -64,7 +64,7 @@ import junit.framework.TestSuite;
|
||||||
/**
|
/**
|
||||||
* Entry point for all Collections package tests.
|
* 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 Rodney Waldhoff
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
|
|
|
@ -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
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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.
|
* 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
|
* @author Stephen Colebourne
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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 $
|
* $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 $
|
||||||
* $Revision: 1.8 $
|
|
||||||
* $Date: 2003/10/02 22:14:29 $
|
|
||||||
*
|
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
* The Apache Software License, Version 1.1
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
@ -58,7 +55,6 @@
|
||||||
* <http://www.apache.org/>.
|
* <http://www.apache.org/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.commons.collections;
|
package org.apache.commons.collections;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -67,52 +63,47 @@ import junit.framework.Test;
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
|
* Abstract test class for ArrayList.
|
||||||
* @version $Id: TestArrayList.java,v 1.8 2003/10/02 22:14:29 scolebourne Exp $
|
*
|
||||||
|
* @version $Revision: 1.9 $ $Date: 2003/10/05 21:03:44 $
|
||||||
|
*
|
||||||
|
* @author Jason van Zyl
|
||||||
*/
|
*/
|
||||||
public abstract class TestArrayList extends AbstractTestList
|
public abstract class TestArrayList extends AbstractTestList {
|
||||||
{
|
|
||||||
public TestArrayList(String testName)
|
protected ArrayList list = null;
|
||||||
{
|
|
||||||
|
public TestArrayList(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite()
|
public static Test suite() {
|
||||||
{
|
|
||||||
return new TestSuite(TestArrayList.class);
|
return new TestSuite(TestArrayList.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String args[])
|
public static void main(String args[]) {
|
||||||
{
|
String[] testCaseName = { TestArrayList.class.getName()};
|
||||||
String[] testCaseName = { TestArrayList.class.getName() };
|
|
||||||
junit.textui.TestRunner.main(testCaseName);
|
junit.textui.TestRunner.main(testCaseName);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ArrayList list = null;
|
public void setUp() {
|
||||||
|
|
||||||
public void setUp()
|
|
||||||
{
|
|
||||||
list = (ArrayList) makeEmptyList();
|
list = (ArrayList) makeEmptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNewArrayList()
|
//-----------------------------------------------------------------------
|
||||||
{
|
public void testNewArrayList() {
|
||||||
assertTrue("New list is empty", list.isEmpty());
|
assertTrue("New list is empty", list.isEmpty());
|
||||||
assertEquals("New list has size zero", list.size(), 0);
|
assertEquals("New list has size zero", list.size(), 0);
|
||||||
|
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
list.get(1);
|
list.get(1);
|
||||||
fail("get(int i) should have thrown IndexOutOfBoundsException");
|
fail("get(int i) should have thrown IndexOutOfBoundsException");
|
||||||
}
|
} catch (IndexOutOfBoundsException e) {
|
||||||
catch (IndexOutOfBoundsException e)
|
|
||||||
{
|
|
||||||
; // Expected result
|
; // Expected result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSearch()
|
public void testSearch() {
|
||||||
{
|
|
||||||
list.add("First Item");
|
list.add("First Item");
|
||||||
list.add("Last Item");
|
list.add("Last Item");
|
||||||
assertEquals("First item is 'First Item'", list.get(0), "First Item");
|
assertEquals("First item is 'First Item'", list.get(0), "First Item");
|
||||||
|
|
|
@ -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 $
|
* $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 $
|
||||||
* $Revision: 1.9 $
|
|
||||||
* $Date: 2003/08/31 17:28:43 $
|
|
||||||
*
|
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
* The Apache Software License, Version 1.1
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
@ -58,7 +55,6 @@
|
||||||
* <http://www.apache.org/>.
|
* <http://www.apache.org/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.commons.collections;
|
package org.apache.commons.collections;
|
||||||
|
|
||||||
import java.util.EmptyStackException;
|
import java.util.EmptyStackException;
|
||||||
|
@ -67,11 +63,15 @@ import java.util.List;
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Tests ArrayStack.
|
||||||
|
*
|
||||||
|
* @version $Revision: 1.10 $ $Date: 2003/10/05 21:03:44 $
|
||||||
|
*
|
||||||
* @author Craig McClanahan
|
* @author Craig McClanahan
|
||||||
* @version $Id: TestArrayStack.java,v 1.9 2003/08/31 17:28:43 scolebourne Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class TestArrayStack extends TestArrayList {
|
public class TestArrayStack extends TestArrayList {
|
||||||
|
|
||||||
|
protected ArrayStack stack = null;
|
||||||
|
|
||||||
public TestArrayStack(String testName) {
|
public TestArrayStack(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
|
@ -90,13 +90,12 @@ public class TestArrayStack extends TestArrayList {
|
||||||
return new ArrayStack();
|
return new ArrayStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ArrayStack stack = null;
|
|
||||||
|
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
stack = (ArrayStack) makeEmptyList();
|
stack = (ArrayStack) makeEmptyList();
|
||||||
list = stack;
|
list = stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
public void testNewStack() {
|
public void testNewStack() {
|
||||||
|
|
||||||
assertTrue("New stack is empty", stack.empty());
|
assertTrue("New stack is empty", stack.empty());
|
||||||
|
@ -118,7 +117,6 @@ public class TestArrayStack extends TestArrayList {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void testPushPeekPop() {
|
public void testPushPeekPop() {
|
||||||
|
|
||||||
stack.push("First Item");
|
stack.push("First Item");
|
||||||
|
@ -146,7 +144,6 @@ public class TestArrayStack extends TestArrayList {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void testSearch() {
|
public void testSearch() {
|
||||||
|
|
||||||
stack.push("First Item");
|
stack.push("First Item");
|
||||||
|
@ -160,5 +157,4 @@ public class TestArrayStack extends TestArrayList {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* 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.
|
* Tests for BagUtils factory methods.
|
||||||
|
*
|
||||||
|
* @version $Revision: 1.3 $ $Date: 2003/10/05 21:03:44 $
|
||||||
*
|
*
|
||||||
* @author Phil Steitz
|
* @author Phil Steitz
|
||||||
*
|
|
||||||
* @version $Revision: 1.2 $ $Date: 2003/09/20 17:02:03 $
|
|
||||||
*/
|
*/
|
||||||
public class TestBagUtils extends BulkTest {
|
public class TestBagUtils extends BulkTest {
|
||||||
|
|
||||||
|
|
|
@ -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 $
|
* $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 $
|
||||||
* $Revision: 1.10 $
|
|
||||||
* $Date: 2003/10/02 22:14:29 $
|
|
||||||
*
|
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
* The Apache Software License, Version 1.1
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
@ -75,8 +72,9 @@ import org.apache.commons.collections.comparators.ReverseComparator;
|
||||||
/**
|
/**
|
||||||
* Tests the BinaryHeap.
|
* Tests the BinaryHeap.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:mas@apache.org">Michael A. Smith</a>
|
* @version $Revision: 1.11 $ $Date: 2003/10/05 21:03:44 $
|
||||||
* @version $Id: TestBinaryHeap.java,v 1.10 2003/10/02 22:14:29 scolebourne Exp $
|
*
|
||||||
|
* @author Michael A. Smith
|
||||||
*/
|
*/
|
||||||
public class TestBinaryHeap extends AbstractTestCollection {
|
public class TestBinaryHeap extends AbstractTestCollection {
|
||||||
|
|
||||||
|
|
|
@ -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
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
@ -66,6 +66,8 @@ import junit.framework.Test;
|
||||||
/**
|
/**
|
||||||
* Test cases for BoundedFifoBuffer.
|
* Test cases for BoundedFifoBuffer.
|
||||||
*
|
*
|
||||||
|
* @version $Revision: 1.9 $ $Date: 2003/10/05 21:03:44 $
|
||||||
|
*
|
||||||
* @author Paul Jack
|
* @author Paul Jack
|
||||||
*/
|
*/
|
||||||
public class TestBoundedFifoBuffer extends AbstractTestCollection {
|
public class TestBoundedFifoBuffer extends AbstractTestCollection {
|
||||||
|
|
|
@ -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 $
|
* $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 $
|
||||||
* $Revision: 1.5 $
|
|
||||||
* $Date: 2003/08/31 17:28:43 $
|
|
||||||
*
|
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
* The Apache Software License, Version 1.1
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
@ -60,16 +57,18 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.commons.collections;
|
package org.apache.commons.collections;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs tests against a full BoundedFifoBuffer, since many of the algorithms
|
* Runs tests against a full BoundedFifoBuffer, since many of the algorithms
|
||||||
* differ depending on whether the fifo is full or not.
|
* 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 {
|
public class TestBoundedFifoBuffer2 extends TestBoundedFifoBuffer {
|
||||||
|
|
||||||
|
|
|
@ -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 $
|
* $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 $
|
||||||
* $Revision: 1.7 $
|
|
||||||
* $Date: 2003/10/02 22:14:28 $
|
|
||||||
*
|
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
* The Apache Software License, Version 1.1
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
@ -68,7 +65,11 @@ import junit.framework.Test;
|
||||||
import org.apache.commons.collections.decorators.PredicatedBuffer;
|
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 {
|
public class TestBufferUtils extends BulkTest {
|
||||||
|
|
||||||
|
@ -141,8 +142,4 @@ public class TestBufferUtils extends BulkTest {
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* $Id: TestCollectionUtils.java,v 1.24 2003/10/05 19:48:00 psteitz Exp $
|
* $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 $
|
||||||
* $Revision: 1.24 $
|
|
||||||
* $Date: 2003/10/05 19:48:00 $
|
|
||||||
*
|
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
* The Apache Software License, Version 1.1
|
* 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.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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"
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* nor may "Apache" appear in their names without prior written
|
* 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
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
@ -58,7 +55,6 @@
|
||||||
* <http://www.apache.org/>.
|
* <http://www.apache.org/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.commons.collections;
|
package org.apache.commons.collections;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -93,9 +89,10 @@ import org.apache.commons.collections.decorators.UnmodifiableCollection;
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
* @author Phil Steitz
|
* @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 class TestCollectionUtils extends TestCase {
|
||||||
|
|
||||||
public TestCollectionUtils(String testName) {
|
public TestCollectionUtils(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
@ -642,7 +639,7 @@ public class TestCollectionUtils extends TestCase {
|
||||||
|
|
||||||
// list, non-existent entry -- IndexOutOfBoundsException
|
// list, non-existent entry -- IndexOutOfBoundsException
|
||||||
try {
|
try {
|
||||||
test = CollectionUtils.index(list, 2);
|
test = CollectionUtils.get(list, 2);
|
||||||
fail("Expecting IndexOutOfBoundsException");
|
fail("Expecting IndexOutOfBoundsException");
|
||||||
} catch (IndexOutOfBoundsException e) {
|
} catch (IndexOutOfBoundsException e) {
|
||||||
// expected
|
// expected
|
||||||
|
|
Loading…
Reference in New Issue