You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2017/07/11 17:54:02 UTC

[14/18] commons-collections git commit: merged with HEAD

merged with HEAD


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_1_x_branch@130605 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/a1fdbead
Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/a1fdbead
Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/a1fdbead

Branch: refs/heads/collections_1_x_branch
Commit: a1fdbead61b7ecf4b2db39bcf13e750114ce1847
Parents: 37f759c
Author: Morgan James Delagrange <mo...@apache.org>
Authored: Tue Feb 26 20:23:10 2002 +0000
Committer: Morgan James Delagrange <mo...@apache.org>
Committed: Tue Feb 26 20:23:10 2002 +0000

----------------------------------------------------------------------
 data/test/FastHashMap.emptyMap.version1.obj     | Bin 200 -> 0 bytes
 data/test/FastHashMap.fullMap.version1.obj      | Bin 451 -> 0 bytes
 data/test/FastTreeMap.emptyMap.version1.obj     | Bin 191 -> 0 bytes
 data/test/FastTreeMap.fullMap.version1.obj      | Bin 630 -> 0 bytes
 data/test/LRUMap.emptyCollection.version1.obj   | Bin 0 -> 126 bytes
 data/test/LRUMap.emptyMap.version1.obj          | Bin 126 -> 0 bytes
 data/test/LRUMap.fullCollection.version1.obj    | Bin 0 -> 663 bytes
 data/test/LRUMap.fullMap.version1.obj           | Bin 663 -> 0 bytes
 .../org/apache/commons/collections/TestAll.java |   9 +-
 .../commons/collections/TestArrayList.java      |  18 +--
 .../commons/collections/TestArrayStack.java     |  12 +-
 .../collections/TestCursorableLinkedList.java   |  10 +-
 .../commons/collections/TestFastArrayList.java  |  12 +-
 .../apache/commons/collections/TestList.java    | 136 +++++++++++++++----
 .../org/apache/commons/collections/TestMap.java |  41 ++----
 .../apache/commons/collections/TestObject.java  |  38 +++++-
 16 files changed, 177 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/data/test/FastHashMap.emptyMap.version1.obj
----------------------------------------------------------------------
diff --git a/data/test/FastHashMap.emptyMap.version1.obj b/data/test/FastHashMap.emptyMap.version1.obj
deleted file mode 100644
index 113e5cc..0000000
Binary files a/data/test/FastHashMap.emptyMap.version1.obj and /dev/null differ

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/data/test/FastHashMap.fullMap.version1.obj
----------------------------------------------------------------------
diff --git a/data/test/FastHashMap.fullMap.version1.obj b/data/test/FastHashMap.fullMap.version1.obj
deleted file mode 100644
index 3e8dff1..0000000
Binary files a/data/test/FastHashMap.fullMap.version1.obj and /dev/null differ

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/data/test/FastTreeMap.emptyMap.version1.obj
----------------------------------------------------------------------
diff --git a/data/test/FastTreeMap.emptyMap.version1.obj b/data/test/FastTreeMap.emptyMap.version1.obj
deleted file mode 100644
index ad18ca8..0000000
Binary files a/data/test/FastTreeMap.emptyMap.version1.obj and /dev/null differ

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/data/test/FastTreeMap.fullMap.version1.obj
----------------------------------------------------------------------
diff --git a/data/test/FastTreeMap.fullMap.version1.obj b/data/test/FastTreeMap.fullMap.version1.obj
deleted file mode 100644
index 32ef3e3..0000000
Binary files a/data/test/FastTreeMap.fullMap.version1.obj and /dev/null differ

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/data/test/LRUMap.emptyCollection.version1.obj
----------------------------------------------------------------------
diff --git a/data/test/LRUMap.emptyCollection.version1.obj b/data/test/LRUMap.emptyCollection.version1.obj
new file mode 100644
index 0000000..c235e33
Binary files /dev/null and b/data/test/LRUMap.emptyCollection.version1.obj differ

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/data/test/LRUMap.emptyMap.version1.obj
----------------------------------------------------------------------
diff --git a/data/test/LRUMap.emptyMap.version1.obj b/data/test/LRUMap.emptyMap.version1.obj
deleted file mode 100644
index c235e33..0000000
Binary files a/data/test/LRUMap.emptyMap.version1.obj and /dev/null differ

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/data/test/LRUMap.fullCollection.version1.obj
----------------------------------------------------------------------
diff --git a/data/test/LRUMap.fullCollection.version1.obj b/data/test/LRUMap.fullCollection.version1.obj
new file mode 100644
index 0000000..417b1fa
Binary files /dev/null and b/data/test/LRUMap.fullCollection.version1.obj differ

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/data/test/LRUMap.fullMap.version1.obj
----------------------------------------------------------------------
diff --git a/data/test/LRUMap.fullMap.version1.obj b/data/test/LRUMap.fullMap.version1.obj
deleted file mode 100644
index 417b1fa..0000000
Binary files a/data/test/LRUMap.fullMap.version1.obj and /dev/null differ

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/src/test/org/apache/commons/collections/TestAll.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestAll.java b/src/test/org/apache/commons/collections/TestAll.java
index 81385a9..42536b3 100644
--- a/src/test/org/apache/commons/collections/TestAll.java
+++ b/src/test/org/apache/commons/collections/TestAll.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAll.java,v 1.15.2.3 2002/02/26 06:17:51 morgand Exp $
- * $Revision: 1.15.2.3 $
- * $Date: 2002/02/26 06:17:51 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAll.java,v 1.15.2.4 2002/02/26 20:23:10 morgand Exp $
+ * $Revision: 1.15.2.4 $
+ * $Date: 2002/02/26 20:23:10 $
  *
  * ====================================================================
  *
@@ -66,7 +66,7 @@ import junit.framework.*;
 /**
  * Entry point for all Collections tests.
  * @author Rodney Waldhoff
- * @version $Id: TestAll.java,v 1.15.2.3 2002/02/26 06:17:51 morgand Exp $
+ * @version $Id: TestAll.java,v 1.15.2.4 2002/02/26 20:23:10 morgand Exp $
  */
 public class TestAll extends TestCase {
     public TestAll(String testName) {
@@ -76,7 +76,6 @@ public class TestAll extends TestCase {
     public static Test suite() {
         TestSuite suite = new TestSuite();
         suite.addTest(TestArrayIterator.suite());
-        suite.addTest(TestArrayList.suite());
         suite.addTest(TestArrayStack.suite());
         suite.addTest(TestCollectionUtils.suite());
         suite.addTest(TestCursorableLinkedList.suite());

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/src/test/org/apache/commons/collections/TestArrayList.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestArrayList.java b/src/test/org/apache/commons/collections/TestArrayList.java
index 44a2e8f..ef929ac 100644
--- a/src/test/org/apache/commons/collections/TestArrayList.java
+++ b/src/test/org/apache/commons/collections/TestArrayList.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayList.java,v 1.2 2001/07/14 23:33:26 craigmcc Exp $
- * $Revision: 1.2 $
- * $Date: 2001/07/14 23:33:26 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayList.java,v 1.2.2.1 2002/02/26 20:23:10 morgand Exp $
+ * $Revision: 1.2.2.1 $
+ * $Date: 2002/02/26 20:23:10 $
  *
  * ====================================================================
  *
@@ -69,9 +69,9 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: TestArrayList.java,v 1.2 2001/07/14 23:33:26 craigmcc Exp $
+ * @version $Id: TestArrayList.java,v 1.2.2.1 2002/02/26 20:23:10 morgand Exp $
  */
-public class TestArrayList extends TestList
+public abstract class TestArrayList extends TestList
 {
     public TestArrayList(String testName)
     {
@@ -93,13 +93,7 @@ public class TestArrayList extends TestList
 
     public void setUp()
     {
-        list = (ArrayList) makeList();
-    }
-
-    public List makeList()
-    {
-        ArrayList al = new ArrayList();
-        return (al);
+        list = (ArrayList) makeEmptyList();
     }
 
     public void testNewArrayList()

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/src/test/org/apache/commons/collections/TestArrayStack.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestArrayStack.java b/src/test/org/apache/commons/collections/TestArrayStack.java
index 1b57b65..624005d 100644
--- a/src/test/org/apache/commons/collections/TestArrayStack.java
+++ b/src/test/org/apache/commons/collections/TestArrayStack.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayStack.java,v 1.5 2001/07/14 23:33:26 craigmcc Exp $
- * $Revision: 1.5 $
- * $Date: 2001/07/14 23:33:26 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayStack.java,v 1.5.2.1 2002/02/26 20:23:10 morgand Exp $
+ * $Revision: 1.5.2.1 $
+ * $Date: 2002/02/26 20:23:10 $
  *
  * ====================================================================
  *
@@ -66,7 +66,7 @@ import java.util.*;
 
 /**
  * @author Craig McClanahan
- * @version $Id: TestArrayStack.java,v 1.5 2001/07/14 23:33:26 craigmcc Exp $
+ * @version $Id: TestArrayStack.java,v 1.5.2.1 2002/02/26 20:23:10 morgand Exp $
  */
 
 public class TestArrayStack extends TestArrayList {
@@ -84,14 +84,14 @@ public class TestArrayStack extends TestArrayList {
         junit.textui.TestRunner.main(testCaseName);
     }
 
-    public List makeList() {
+    public List makeEmptyList() {
         return new ArrayStack();
     }
 
     protected ArrayStack stack = null;
 
     public void setUp() {
-        stack = (ArrayStack) makeList();
+        stack = (ArrayStack) makeEmptyList();
         list = stack;
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/src/test/org/apache/commons/collections/TestCursorableLinkedList.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestCursorableLinkedList.java b/src/test/org/apache/commons/collections/TestCursorableLinkedList.java
index 87c5349..0e1e665 100644
--- a/src/test/org/apache/commons/collections/TestCursorableLinkedList.java
+++ b/src/test/org/apache/commons/collections/TestCursorableLinkedList.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestCursorableLinkedList.java,v 1.3 2001/07/14 23:33:27 craigmcc Exp $
- * $Revision: 1.3 $
- * $Date: 2001/07/14 23:33:27 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestCursorableLinkedList.java,v 1.3.2.1 2002/02/26 20:23:10 morgand Exp $
+ * $Revision: 1.3.2.1 $
+ * $Date: 2002/02/26 20:23:10 $
  *
  * ====================================================================
  *
@@ -66,7 +66,7 @@ import java.util.*;
 
 /**
  * @author Rodney Waldhoff
- * @version $Id: TestCursorableLinkedList.java,v 1.3 2001/07/14 23:33:27 craigmcc Exp $
+ * @version $Id: TestCursorableLinkedList.java,v 1.3.2.1 2002/02/26 20:23:10 morgand Exp $
  */
 public class TestCursorableLinkedList extends TestList {
     public TestCursorableLinkedList(String testName) {
@@ -88,7 +88,7 @@ public class TestCursorableLinkedList extends TestList {
         list = new CursorableLinkedList();
     }
 
-    public List makeList() {
+    public List makeEmptyList() {
         return new CursorableLinkedList();
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/src/test/org/apache/commons/collections/TestFastArrayList.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestFastArrayList.java b/src/test/org/apache/commons/collections/TestFastArrayList.java
index 1905a6e..7907e0c 100644
--- a/src/test/org/apache/commons/collections/TestFastArrayList.java
+++ b/src/test/org/apache/commons/collections/TestFastArrayList.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastArrayList.java,v 1.3 2001/04/21 12:22:30 craigmcc Exp $
- * $Revision: 1.3 $
- * $Date: 2001/04/21 12:22:30 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastArrayList.java,v 1.3.2.1 2002/02/26 20:23:10 morgand Exp $
+ * $Revision: 1.3.2.1 $
+ * $Date: 2002/02/26 20:23:10 $
  *
  * ====================================================================
  *
@@ -69,7 +69,7 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: TestFastArrayList.java,v 1.3 2001/04/21 12:22:30 craigmcc Exp $
+ * @version $Id: TestFastArrayList.java,v 1.3.2.1 2002/02/26 20:23:10 morgand Exp $
  */
 public class TestFastArrayList extends TestArrayList
 {
@@ -91,10 +91,10 @@ public class TestFastArrayList extends TestArrayList
 
     public void setUp()
     {
-        list = (ArrayList) makeList();
+        list = (ArrayList) makeEmptyList();
     }
 
-    public List makeList()
+    public List makeEmptyList()
     {
         FastArrayList fal = new FastArrayList();
         fal.setFast(false);

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/src/test/org/apache/commons/collections/TestList.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestList.java b/src/test/org/apache/commons/collections/TestList.java
index fd80712..227b05b 100644
--- a/src/test/org/apache/commons/collections/TestList.java
+++ b/src/test/org/apache/commons/collections/TestList.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestList.java,v 1.5 2001/07/14 23:33:27 craigmcc Exp $
- * $Revision: 1.5 $
- * $Date: 2001/07/14 23:33:27 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestList.java,v 1.5.2.1 2002/02/26 20:23:10 morgand Exp $
+ * $Revision: 1.5.2.1 $
+ * $Date: 2002/02/26 20:23:10 $
  *
  * ====================================================================
  *
@@ -62,6 +62,8 @@
 package org.apache.commons.collections;
 
 import junit.framework.*;
+import java.io.IOException;
+import java.io.Serializable;
 import java.util.List;
 import java.util.Collection;
 import java.util.Arrays;
@@ -80,7 +82,7 @@ import java.util.ListIterator;
  * test case (method) your {@link List} fails.
  *
  * @author Rodney Waldhoff
- * @version $Id: TestList.java,v 1.5 2001/07/14 23:33:27 craigmcc Exp $
+ * @version $Id: TestList.java,v 1.5.2.1 2002/02/26 20:23:10 morgand Exp $
  */
 public abstract class TestList extends TestCollection {
     public TestList(String testName) {
@@ -90,14 +92,30 @@ public abstract class TestList extends TestCollection {
     /**
      * Return a new, empty {@link List} to used for testing.
      */
-    public abstract List makeList();
+    public abstract List makeEmptyList();
+
+    public List makeFullList() {
+        // only works if list supports optional "add(Object)" 
+        // and "add(int,Object)" operations
+        List list = makeEmptyList();
+        list.add("1");
+        // must be able to add to the end this way
+        list.add(list.size(),"4");
+        // must support duplicates
+        list.add("1");
+        // must support insertions
+        list.add(1,"3");
+
+        // resultant list: 1, 3, 4, 1
+        return list;
+    }
 
     public Collection makeCollection() {
-        return makeList();
+        return makeEmptyList();
     }
 
     public void testListAddByIndexBoundsChecking() {
-        List list = makeList();
+        List list = makeEmptyList();
 
         try {
             list.add(Integer.MIN_VALUE,"element");
@@ -153,7 +171,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListAddByIndexBoundsChecking2() {
-        List list = makeList();
+        List list = makeEmptyList();
         boolean added = tryToAdd(list,"element");
 
         try {
@@ -184,7 +202,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListAddByIndex() {
-        List list = makeList();
+        List list = makeEmptyList();
         assertEquals(0,list.size());
         if(tryToAdd(list,0,"element2")) {
             assertEquals(1,list.size());
@@ -201,7 +219,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListAdd() {
-        List list = makeList();
+        List list = makeEmptyList();
         if(tryToAdd(list,"1")) {
             assertTrue(list.contains("1"));
             if(tryToAdd(list,"2")) {
@@ -223,7 +241,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListEqualsSelf() {
-        List list = makeList();
+        List list = makeEmptyList();
         assertTrue(list.equals(list));
         tryToAdd(list,"elt");
         assertTrue(list.equals(list));
@@ -232,7 +250,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListEqualsArrayList() {
-        List list1 = makeList();
+        List list1 = makeEmptyList();
         List list2 = new ArrayList();
         assertTrue(list1.equals(list2));
         assertEquals(list1.hashCode(),list2.hashCode());
@@ -252,8 +270,8 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListEquals() {
-        List list1 = makeList();
-        List list2 = makeList();
+        List list1 = makeEmptyList();
+        List list2 = makeEmptyList();
         assertTrue(list1.equals(list2));
         if(tryToAdd(list1,"a") && tryToAdd(list2,"a")) {
             assertTrue(list1.equals(list2));
@@ -270,7 +288,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListGetByIndex() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"a");
         tryToAdd(list,"b");
         tryToAdd(list,"c");
@@ -284,7 +302,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListGetByIndexBoundsChecking() {
-        List list = makeList();
+        List list = makeEmptyList();
 
         try {
             list.get(Integer.MIN_VALUE);
@@ -323,7 +341,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListGetByIndexBoundsChecking2() {
-        List list = makeList();
+        List list = makeEmptyList();
         boolean added = tryToAdd(list,"a");
 
         try {
@@ -356,7 +374,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListIndexOf() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"a");
         tryToAdd(list,"b");
         tryToAdd(list,"c");
@@ -371,7 +389,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListLastIndexOf1() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"a");
         tryToAdd(list,"b");
         tryToAdd(list,"c");
@@ -386,7 +404,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListLastIndexOf2() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"a");
         tryToAdd(list,"b");
         tryToAdd(list,"c");
@@ -434,7 +452,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListSetByIndexBoundsChecking() {
-        List list = makeList();
+        List list = makeEmptyList();
 
         try {
             list.set(Integer.MIN_VALUE,"a");
@@ -503,7 +521,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListSetByIndexBoundsChecking2() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"element");
         tryToAdd(list,"element2");
 
@@ -561,7 +579,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListSetByIndex() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"element");
         tryToAdd(list,"element2");
         tryToAdd(list,"element3");
@@ -586,7 +604,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListRemoveByIndex() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"element");
         tryToAdd(list,"element2");
         tryToAdd(list,"element3");
@@ -615,7 +633,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListRemoveByValue() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"element1");
         tryToAdd(list,"element2");
         tryToAdd(list,"element3");
@@ -637,7 +655,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListListIteratorNextPrev() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"element1");
         tryToAdd(list,"element2");
         tryToAdd(list,"element3");
@@ -667,7 +685,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListListIteratorNextIndexPrevIndex() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"element1");
         tryToAdd(list,"element2");
         tryToAdd(list,"element3");
@@ -689,7 +707,7 @@ public abstract class TestList extends TestCollection {
     }
 
     public void testListListIteratorSet() {
-        List list = makeList();
+        List list = makeEmptyList();
         tryToAdd(list,"element1");
         tryToAdd(list,"element2");
         tryToAdd(list,"element3");
@@ -782,4 +800,66 @@ public abstract class TestList extends TestCollection {
         }
     }
 
+    public void testEmptyListSerialization() 
+    throws IOException, ClassNotFoundException {
+        List list = makeEmptyList();
+        if (!(list instanceof Serializable)) return;
+        
+        byte[] objekt = writeExternalFormToBytes((Serializable) list);
+        List list2 = (List) readExternalFormFromBytes(objekt);
+
+        assertTrue("Both lists are empty",list.size()  == 0);
+        assertTrue("Both lists are empty",list2.size() == 0);
+    }
+
+    public void testFullListSerialization() 
+    throws IOException, ClassNotFoundException {
+        List list = makeFullList();
+        if (!(list instanceof Serializable)) return;
+        
+        byte[] objekt = writeExternalFormToBytes((Serializable) list);
+        List list2 = (List) readExternalFormFromBytes(objekt);
+
+        assertEquals("Both lists are same size",list.size(), 4);
+        assertEquals("Both lists are same size",list2.size(),4);
+    }
+
+    /**
+     * Compare the current serialized form of the List
+     * against the canonical version in CVS.
+     */
+    public void testEmptyListCompatibility() throws IOException, ClassNotFoundException {
+        /**
+         * Create canonical objects with this code
+        List list = makeEmptyList();
+        if (!(list instanceof Serializable)) return;
+        
+        writeExternalFormToDisk((Serializable) list, getCanonicalEmptyCollectionName(list));
+        */
+
+        // test to make sure the canonical form has been preserved
+        if (!(makeEmptyList() instanceof Serializable)) return;
+        List list = (List) readExternalFormFromDisk(getCanonicalEmptyCollectionName(makeEmptyList()));
+        assertTrue("List is empty",list.size()  == 0);
+    }
+
+        /**
+     * Compare the current serialized form of the List
+     * against the canonical version in CVS.
+     */
+    public void testFullListCompatibility() throws IOException, ClassNotFoundException {
+        /**
+         * Create canonical objects with this code
+        List list = makeFullList();
+        if (!(list instanceof Serializable)) return;
+        
+        writeExternalFormToDisk((Serializable) list, getCanonicalFullCollectionName(list));
+        */
+
+        // test to make sure the canonical form has been preserved
+        if (!(makeFullList() instanceof Serializable)) return;
+        List list = (List) readExternalFormFromDisk(getCanonicalFullCollectionName(makeFullList()));
+        assertEquals("List is the right size",list.size(), 4);
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/src/test/org/apache/commons/collections/TestMap.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestMap.java b/src/test/org/apache/commons/collections/TestMap.java
index 7c18049..b522bcd 100644
--- a/src/test/org/apache/commons/collections/TestMap.java
+++ b/src/test/org/apache/commons/collections/TestMap.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestMap.java,v 1.3.2.3 2002/02/26 06:28:41 morgand Exp $
- * $Revision: 1.3.2.3 $
- * $Date: 2002/02/26 06:28:41 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestMap.java,v 1.3.2.4 2002/02/26 20:18:53 morgand Exp $
+ * $Revision: 1.3.2.4 $
+ * $Date: 2002/02/26 20:18:53 $
  *
  * ====================================================================
  *
@@ -87,7 +87,7 @@ import java.util.NoSuchElementException;
  *
  * @author Michael Smith
  * @author Rodney Waldhoff
- * @version $Id: TestMap.java,v 1.3.2.3 2002/02/26 06:28:41 morgand Exp $
+ * @version $Id: TestMap.java,v 1.3.2.4 2002/02/26 20:18:53 morgand Exp $
  */
 public abstract class TestMap extends TestObject {
 
@@ -929,31 +929,6 @@ public abstract class TestMap extends TestObject {
         assertEquals("Both maps are same size",map2.size(),getSampleKeys().length);
     }
 
-
-    public String getCanonicalEmptyMapName(Map map) {
-        StringBuffer retval = new StringBuffer();
-        retval.append("data/test/");
-        String mapName = map.getClass().getName();
-        mapName = mapName.substring(mapName.lastIndexOf(".")+1,mapName.length());
-        retval.append(mapName);
-        retval.append(".emptyMap.version");
-        retval.append(getCompatibilityVersion());
-        retval.append(".obj");
-        return retval.toString();
-    }
-
-    public String getCanonicalFullMapName(Map map) {
-        StringBuffer retval = new StringBuffer();
-        retval.append("data/test/");
-        String mapName = map.getClass().getName();
-        mapName = mapName.substring(mapName.lastIndexOf(".")+1,mapName.length());
-        retval.append(mapName);
-        retval.append(".fullMap.version");
-        retval.append(getCompatibilityVersion());
-        retval.append(".obj");
-        return retval.toString();
-    }
-
     /**
      * Compare the current serialized form of the Map
      * against the canonical version in CVS.
@@ -965,12 +940,12 @@ public abstract class TestMap extends TestObject {
         map = makeEmptyMap();
         if (!(map instanceof Serializable)) return;
         
-        writeExternalFormToDisk((Serializable) map, getCanonicalEmptyMapName(map));
+        writeExternalFormToDisk((Serializable) map, getCanonicalEmptyCollectionName(map));
         */
 
         // test to make sure the canonical form has been preserved
         if (!(makeEmptyMap() instanceof Serializable)) return;
-        map = (Map) readExternalFormFromDisk(getCanonicalEmptyMapName(makeEmptyMap()));
+        map = (Map) readExternalFormFromDisk(getCanonicalEmptyCollectionName(makeEmptyMap()));
         assertTrue("Map is empty",map.isEmpty()  == true);
     }
 
@@ -986,12 +961,12 @@ public abstract class TestMap extends TestObject {
         map = makeFullMap();
         if (!(map instanceof Serializable)) return;
         
-        writeExternalFormToDisk((Serializable) map, getCanonicalFullMapName(map));
+        writeExternalFormToDisk((Serializable) map, getCanonicalFullCollectionName(map));
         */
 
         // test to make sure the canonical form has been preserved
         if (!(makeFullMap() instanceof Serializable)) return;
-        map = (Map) readExternalFormFromDisk(getCanonicalFullMapName(makeFullMap()));
+        map = (Map) readExternalFormFromDisk(getCanonicalFullCollectionName(makeFullMap()));
         assertEquals("Map is the right size",map.size(), getSampleKeys().length);
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/a1fdbead/src/test/org/apache/commons/collections/TestObject.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestObject.java b/src/test/org/apache/commons/collections/TestObject.java
index fa97171..7e04a35 100644
--- a/src/test/org/apache/commons/collections/TestObject.java
+++ b/src/test/org/apache/commons/collections/TestObject.java
@@ -1,7 +1,13 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestObject.java,v 1.1.2.1 2002/02/26 00:48:14 morgand Exp $
- * $Revision: 1.1.2.1 $
- * $Date: 2002/02/26 00:48:14 $
+<<<<<<< TestObject.java
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestObject.java,v 1.1.2.2 2002/02/26 20:18:53 morgand Exp $
+ * $Revision: 1.1.2.2 $
+ * $Date: 2002/02/26 20:18:53 $
+=======
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestObject.java,v 1.1.2.2 2002/02/26 20:18:53 morgand Exp $
+ * $Revision: 1.1.2.2 $
+ * $Date: 2002/02/26 20:18:53 $
+>>>>>>> 1.8
  *
  * ====================================================================
  *
@@ -90,7 +96,7 @@ import java.util.NoSuchElementException;
  * test case (method) your {@link Object} fails.
  *
  * @author Rodney Waldhoff
- * @version $Id: TestObject.java,v 1.1.2.1 2002/02/26 00:48:14 morgand Exp $
+ * @version $Id: TestObject.java,v 1.1.2.2 2002/02/26 20:18:53 morgand Exp $
  */
 public abstract class TestObject extends TestCase {
     public TestObject(String testName) {
@@ -235,4 +241,28 @@ public abstract class TestObject extends TestCase {
             Object p = readExternalFormFromBytes(objekt);
         }
     }
+
+    public String getCanonicalEmptyCollectionName(Object object) {
+        StringBuffer retval = new StringBuffer();
+        retval.append("data/test/");
+        String colName = object.getClass().getName();
+        colName = colName.substring(colName.lastIndexOf(".")+1,colName.length());
+        retval.append(colName);
+        retval.append(".emptyCollection.version");
+        retval.append(getCompatibilityVersion());
+        retval.append(".obj");
+        return retval.toString();
+    }
+
+    public String getCanonicalFullCollectionName(Object object) {
+        StringBuffer retval = new StringBuffer();
+        retval.append("data/test/");
+        String colName = object.getClass().getName();
+        colName = colName.substring(colName.lastIndexOf(".")+1,colName.length());
+        retval.append(colName);
+        retval.append(".fullCollection.version");
+        retval.append(getCompatibilityVersion());
+        retval.append(".obj");
+        return retval.toString();
+    }
 }