commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject [09/18] commons-collections git commit: merged in test changed from the HEAD into collections 1.x branch
Date Tue, 11 Jul 2017 17:53:57 GMT
merged in test changed from the HEAD into collections 1.x branch


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_1_x_branch@130593
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/14117694
Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/14117694
Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/14117694

Branch: refs/heads/collections_1_x_branch
Commit: 141176948fd644eace598e9a5ea705720212f7ba
Parents: 205c1a3
Author: Morgan James Delagrange <morgand@apache.org>
Authored: Tue Feb 26 06:17:51 2002 +0000
Committer: Morgan James Delagrange <morgand@apache.org>
Committed: Tue Feb 26 06:17:51 2002 +0000

----------------------------------------------------------------------
 .../org/apache/commons/collections/TestAll.java | 10 +++----
 .../commons/collections/TestFastHashMap.java    | 12 ++++----
 .../commons/collections/TestFastTreeMap.java    | 19 +++++++++----
 .../apache/commons/collections/TestHashMap.java | 27 ++++++++----------
 .../apache/commons/collections/TestLRUMap.java  | 29 +++-----------------
 .../org/apache/commons/collections/TestMap.java | 18 ++++--------
 .../commons/collections/TestSoftRefHashMap.java | 12 ++++----
 .../apache/commons/collections/TestTreeMap.java | 26 +++++++++---------
 8 files changed, 64 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-collections/blob/14117694/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 5c138e3..81385a9 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.2 2002/02/26 05:44:14 morgand Exp $
- * $Revision: 1.15.2.2 $
- * $Date: 2002/02/26 05:44:14 $
+ * $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 $
  *
  * ====================================================================
  *
@@ -66,7 +66,7 @@ import junit.framework.*;
 /**
  * Entry point for all Collections tests.
  * @author Rodney Waldhoff
- * @version $Id: TestAll.java,v 1.15.2.2 2002/02/26 05:44:14 morgand Exp $
+ * @version $Id: TestAll.java,v 1.15.2.3 2002/02/26 06:17:51 morgand Exp $
  */
 public class TestAll extends TestCase {
     public TestAll(String testName) {
@@ -87,8 +87,6 @@ public class TestAll extends TestCase {
         suite.addTest(TestFastHashMap1.suite());
         suite.addTest(TestFastTreeMap.suite());
         suite.addTest(TestFastTreeMap1.suite());
-        suite.addTest(TestHashMap.suite());
-        suite.addTest(TestTreeMap.suite());
         suite.addTest(TestLRUMap.suite());
         return suite;
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/14117694/src/test/org/apache/commons/collections/TestFastHashMap.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestFastHashMap.java b/src/test/org/apache/commons/collections/TestFastHashMap.java
index 8241ee6..fc66754 100644
--- a/src/test/org/apache/commons/collections/TestFastHashMap.java
+++ b/src/test/org/apache/commons/collections/TestFastHashMap.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastHashMap.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/TestFastHashMap.java,v
1.3.2.1 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.3.2.1 $
+ * $Date: 2002/02/26 06:17:51 $
  *
  * ====================================================================
  *
@@ -69,7 +69,7 @@ import java.util.Map;
 
 /**
  * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: TestFastHashMap.java,v 1.3 2001/04/21 12:22:30 craigmcc Exp $
+ * @version $Id: TestFastHashMap.java,v 1.3.2.1 2002/02/26 06:17:51 morgand Exp $
  */
 public class TestFastHashMap extends TestHashMap
 {
@@ -89,7 +89,7 @@ public class TestFastHashMap extends TestHashMap
         junit.textui.TestRunner.main(testCaseName);
     }
 
-    public Map makeMap() {
+    public Map makeEmptyMap() {
         FastHashMap fhm = new FastHashMap();
         fhm.setFast(false);
         return (fhm);
@@ -97,7 +97,7 @@ public class TestFastHashMap extends TestHashMap
 
     public void setUp()
     {
-        map = (HashMap) makeMap();
+        map = (HashMap) makeEmptyMap();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/14117694/src/test/org/apache/commons/collections/TestFastTreeMap.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestFastTreeMap.java b/src/test/org/apache/commons/collections/TestFastTreeMap.java
index 4313fc8..fd95c42 100644
--- a/src/test/org/apache/commons/collections/TestFastTreeMap.java
+++ b/src/test/org/apache/commons/collections/TestFastTreeMap.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastTreeMap.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/TestFastTreeMap.java,v
1.3.2.1 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.3.2.1 $
+ * $Date: 2002/02/26 06:17:51 $
  *
  * ====================================================================
  *
@@ -69,7 +69,7 @@ import java.util.TreeMap;
 
 /**
  * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: TestFastTreeMap.java,v 1.3 2001/04/21 12:22:30 craigmcc Exp $
+ * @version $Id: TestFastTreeMap.java,v 1.3.2.1 2002/02/26 06:17:51 morgand Exp $
  */
 public class TestFastTreeMap extends TestTreeMap
 {
@@ -89,15 +89,22 @@ public class TestFastTreeMap extends TestTreeMap
         junit.textui.TestRunner.main(testCaseName);
     }
 
-    public Map makeMap() {
+    public Map makeEmptyMap() {
         FastTreeMap ftm = new FastTreeMap();
         ftm.setFast(false);
         return (ftm);
     }
+  
+    /**
+     *  The comparator for the fast tree map does not support null keys.
+     **/
+    public boolean useNullKey() {
+      return false;
+    }
 
     public void setUp()
     {
-        map = (TreeMap) makeMap();
+        map = (TreeMap) makeEmptyMap();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/14117694/src/test/org/apache/commons/collections/TestHashMap.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestHashMap.java b/src/test/org/apache/commons/collections/TestHashMap.java
index c28f788..5e0c569 100644
--- a/src/test/org/apache/commons/collections/TestHashMap.java
+++ b/src/test/org/apache/commons/collections/TestHashMap.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/TestHashMap.java,v
1.2.2.1 2002/02/26 00:51:21 morgand Exp $
- * $Revision: 1.2.2.1 $
- * $Date: 2002/02/26 00:51:21 $
+<<<<<<< TestHashMap.java
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestHashMap.java,v
1.2.2.2 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.2.2.2 $
+ * $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/Attic/TestHashMap.java,v
1.2.2.2 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.2.2.2 $
+ * $Date: 2002/02/26 06:17:51 $
+>>>>>>> 1.6
  *
  * ====================================================================
  *
@@ -69,31 +75,21 @@ import java.util.Map;
 
 /**
  * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: TestHashMap.java,v 1.2.2.1 2002/02/26 00:51:21 morgand Exp $
+ * @version $Id: TestHashMap.java,v 1.2.2.2 2002/02/26 06:17:51 morgand Exp $
  */
-public class TestHashMap extends TestMap
+public abstract class TestHashMap extends TestMap
 {
     public TestHashMap(String testName)
     {
         super(testName);
     }
 
-    public static Test suite()
-    {
-        return new TestSuite(TestHashMap.class);
-    }
-
     public static void main(String args[])
     {
         String[] testCaseName = { TestHashMap.class.getName() };
         junit.textui.TestRunner.main(testCaseName);
     }
 
-    public Map makeEmptyMap() {
-        HashMap hm = new HashMap();
-        return (hm);
-    }
-
     protected HashMap map = null;
 
     public void setUp()
@@ -114,4 +110,5 @@ public class TestHashMap extends TestMap
         assertEquals("Top item is 'Second Item'", map.get("first"), "First Item");
         assertEquals("Next Item is 'First Item'", map.get("second"), "Second Item");
     }
+
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/14117694/src/test/org/apache/commons/collections/TestLRUMap.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestLRUMap.java b/src/test/org/apache/commons/collections/TestLRUMap.java
index 091252b..3b022da 100644
--- a/src/test/org/apache/commons/collections/TestLRUMap.java
+++ b/src/test/org/apache/commons/collections/TestLRUMap.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestLRUMap.java,v
1.11.2.1 2002/02/26 00:51:21 morgand Exp $
- * $Revision: 1.11.2.1 $
- * $Date: 2002/02/26 00:51:21 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestLRUMap.java,v
1.11.2.2 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.11.2.2 $
+ * $Date: 2002/02/26 06:17:51 $
  *
  * ====================================================================
  *
@@ -76,7 +76,7 @@ import java.util.HashMap;
  * 
  * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  * @author <a href="mailto:morgand@apache.org">Morgan Delagrange</a>
- * @version $Id: TestLRUMap.java,v 1.11.2.1 2002/02/26 00:51:21 morgand Exp $
+ * @version $Id: TestLRUMap.java,v 1.11.2.2 2002/02/26 06:17:51 morgand Exp $
  */
 public class TestLRUMap extends TestMap
 {
@@ -190,27 +190,6 @@ public class TestLRUMap extends TestMap
                    map.size() == 3);
     }
 
-
-    public void testExternalizable() throws IOException, ClassNotFoundException {
-        /*
-         * Test object created with this code
-         * Object created from CVS version 1.3 of the LRUMap class
-         *
-        LRUMap map2 = new LRUMap(3);
-        map2.put(new Integer(1),"foo");
-        map2.put(new Integer(4),"bar");
-        map2.put(new Integer(6),"yeah");
-        map2.writeExternal(new ObjectOutputStream(new FileOutputStream("data/test/LRUMapVersion1.obj")));
-         */
-
-        // purposely start me out with a smaller capacity
-        LRUMap map2 = new LRUMap(1);
-        map2.readExternal(new ObjectInputStream(new FileInputStream("data/test/LRUMapVersion1.obj")));
-        assertTrue("Integer(1) equals foo",map2.get(new Integer(1)).equals("foo"));
-        assertTrue("Integer(4) equals bar",map2.get(new Integer(4)).equals("bar"));
-        assertTrue("Integer(6) equals yeah",map2.get(new Integer(6)).equals("yeah"));
-    }
-
     /**
      * You should be able to subclass LRUMap and perform a 
      * custom action when items are removed automatically

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/14117694/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 0261d3f..5847898 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.1 2002/02/26 00:51:21 morgand Exp $
- * $Revision: 1.3.2.1 $
- * $Date: 2002/02/26 00:51:21 $
+ * $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.2 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.3.2.2 $
+ * $Date: 2002/02/26 06:17:51 $
  *
  * ====================================================================
  *
@@ -87,7 +87,7 @@ import java.util.NoSuchElementException;
  *
  * @author Michael Smith
  * @author Rodney Waldhoff
- * @version $Id: TestMap.java,v 1.3.2.1 2002/02/26 00:51:21 morgand Exp $
+ * @version $Id: TestMap.java,v 1.3.2.2 2002/02/26 06:17:51 morgand Exp $
  */
 public abstract class TestMap extends TestObject {
 
@@ -959,17 +959,14 @@ public abstract class TestMap extends TestObject {
      * against the canonical version in CVS.
      */
     public void testEmptyMapCompatibility() throws IOException, ClassNotFoundException {
-        /**
-         * Create canonical objects with this code
         Map map = makeEmptyMap();
         if (!(map instanceof Serializable)) return;
         
         writeExternalFormToDisk((Serializable) map, getCanonicalEmptyMapName(map));
-        */
 
         // test to make sure the canonical form has been preserved
         if (!(makeEmptyMap() instanceof Serializable)) return;
-        Map map = (Map) readExternalFormFromDisk(getCanonicalEmptyMapName(makeEmptyMap()));
+        map = (Map) readExternalFormFromDisk(getCanonicalEmptyMapName(makeEmptyMap()));
         assertTrue("Map is empty",map.isEmpty()  == true);
     }
 
@@ -978,17 +975,14 @@ public abstract class TestMap extends TestObject {
      * against the canonical version in CVS.
      */
     public void testFullMapCompatibility() throws IOException, ClassNotFoundException {
-        /**
-         * Create canonical objects with this code
         Map map = makeFullMap();
         if (!(map instanceof Serializable)) return;
         
         writeExternalFormToDisk((Serializable) map, getCanonicalFullMapName(map));
-        */
 
         // test to make sure the canonical form has been preserved
         if (!(makeFullMap() instanceof Serializable)) return;
-        Map map = (Map) readExternalFormFromDisk(getCanonicalFullMapName(makeFullMap()));
+        map = (Map) readExternalFormFromDisk(getCanonicalFullMapName(makeFullMap()));
         assertEquals("Map is the right size",map.size(), getSampleKeys().length);
     }
 

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/14117694/src/test/org/apache/commons/collections/TestSoftRefHashMap.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestSoftRefHashMap.java b/src/test/org/apache/commons/collections/TestSoftRefHashMap.java
index bae4fa1..ccb19a5 100644
--- a/src/test/org/apache/commons/collections/TestSoftRefHashMap.java
+++ b/src/test/org/apache/commons/collections/TestSoftRefHashMap.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/TestSoftRefHashMap.java,v
1.1 2001/05/06 11:10:36 jstrachan Exp $
- * $Revision: 1.1 $
- * $Date: 2001/05/06 11:10:36 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestSoftRefHashMap.java,v
1.1.2.1 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.1.2.1 $
+ * $Date: 2002/02/26 06:17:51 $
  *
  * ====================================================================
  *
@@ -69,7 +69,7 @@ import java.util.HashMap;
 
 /**
  * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
- * @version $Id: TestSoftRefHashMap.java,v 1.1 2001/05/06 11:10:36 jstrachan Exp $
+ * @version $Id: TestSoftRefHashMap.java,v 1.1.2.1 2002/02/26 06:17:51 morgand Exp $
  */
 public class TestSoftRefHashMap extends TestHashMap
 {
@@ -86,13 +86,13 @@ public class TestSoftRefHashMap extends TestHashMap
         junit.textui.TestRunner.main(testCaseName);
     }
 
-    public Map makeMap() {
+    public Map makeEmptyMap() {
         SoftRefHashMap map = new SoftRefHashMap();
         return map;
     }
 
     public void setUp() {
-        map = (HashMap) makeMap();
+        map = (HashMap) makeEmptyMap();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/14117694/src/test/org/apache/commons/collections/TestTreeMap.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/TestTreeMap.java b/src/test/org/apache/commons/collections/TestTreeMap.java
index ab8d6bf..d85211b 100644
--- a/src/test/org/apache/commons/collections/TestTreeMap.java
+++ b/src/test/org/apache/commons/collections/TestTreeMap.java
@@ -1,7 +1,13 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestTreeMap.java,v
1.2.2.1 2002/02/26 00:51:21 morgand Exp $
- * $Revision: 1.2.2.1 $
- * $Date: 2002/02/26 00:51:21 $
+<<<<<<< TestTreeMap.java
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestTreeMap.java,v
1.2.2.2 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.2.2.2 $
+ * $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/TestTreeMap.java,v
1.2.2.2 2002/02/26 06:17:51 morgand Exp $
+ * $Revision: 1.2.2.2 $
+ * $Date: 2002/02/26 06:17:51 $
+>>>>>>> 1.5
  *
  * ====================================================================
  *
@@ -69,29 +75,23 @@ import java.util.Map;
 
 /**
  * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: TestTreeMap.java,v 1.2.2.1 2002/02/26 00:51:21 morgand Exp $
+ * @version $Id: TestTreeMap.java,v 1.2.2.2 2002/02/26 06:17:51 morgand Exp $
  */
-public class TestTreeMap extends TestMap
+public abstract class TestTreeMap extends TestMap
 {
     public TestTreeMap(String testName)
     {
         super(testName);
     }
 
-    public static Test suite()
-    {
-        return new TestSuite(TestTreeMap.class);
-    }
-
     public static void main(String args[])
     {
         String[] testCaseName = { TestTreeMap.class.getName() };
         junit.textui.TestRunner.main(testCaseName);
     }
 
-    public Map makeEmptyMap() {
-        TreeMap tm = new TreeMap();
-        return (tm);
+    public boolean useNullKey() {
+      return false;
     }
 
     protected TreeMap map = null;


Mime
View raw message