Enabled the new test framework in the following test classes:

- TestBeanMap
 - TestCursorableLinkedList
 - TestDoubleOrderedMap
 - TestFastHashMap
 - TestFastHashMap1
 - TestFastTreeMap
 - TestFastTreeMap1
 - TestLRUMap
 - TestSequencedHashMap
 - TestSoftRefHashMap

Submitted by Paul Jack ( pjack at sfaf dot org ).

Note: TestAll does not contain reference to TestSoftRefHashMap, so this test is
not automatically run.  If you run it manually, you will see many failures that
are due to bug 9571.

Note: With this commit, there are four test failures if you are running with
JDK 1.2.  This is due to a bug in the JDK's implementation of keySet on a
HashMap which incorrectly returns false after removing a mapping which maps a
key to a null value.  Incidently, this problem is very similar to the problem
that existed on SequencedHashMap, filed as bug 9719, and fixed on June 9th.
See: http://developer.java.sun.com/developer/bugParade/bugs/4286765.html


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130727 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Smith 2002-06-18 05:35:58 +00:00
parent 326f500bb3
commit 02c0d12fca
10 changed files with 58 additions and 48 deletions

View File

@ -1,7 +1,7 @@
/*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBeanMap.java,v 1.5 2002/03/13 04:59:03 mas Exp $
* $Revision: 1.5 $
* $Date: 2002/03/13 04:59:03 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBeanMap.java,v 1.6 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.6 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -76,7 +76,7 @@ public class TestBeanMap extends TestMap {
}
public static Test suite() {
return new TestSuite(TestBeanMap.class);
return BulkTest.makeSuite(TestBeanMap.class);
}
/*
@ -317,4 +317,18 @@ public class TestBeanMap extends TestMap {
"CloneNotSupportedException when clone should succeed.");
}
}
public String[] ignoredSimpleTests() {
// Ignore the serialization tests on collection views.
return new String[] {
"TestBeanMap.bulkTestMapEntrySet.testCanonicalEmptyCollectionExists",
"TestBeanMap.bulkTestMapEntrySet.testCanonicalFullCollectionExists",
"TestBeanMap.bulkTestMapKeySet.testCanonicalEmptyCollectionExists",
"TestBeanMap.bulkTestMapKeySet.testCanonicalFullCollectionExists",
"TestBeanMap.bulkTestMapValues.testCanonicalEmptyCollectionExists",
"TestBeanMap.bulkTestMapValues.testCanonicalFullCollectionExists",
"TestBeanMap.bulkTestMapEntrySet.testSimpleSerialization",
"TestBeanMap.bulkTestMapKeySet.testSimpleSerialization"
};
}
}

View File

@ -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.4 2002/02/25 23:51:24 morgand Exp $
* $Revision: 1.4 $
* $Date: 2002/02/25 23:51:24 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestCursorableLinkedList.java,v 1.5 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.5 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -66,7 +66,7 @@ import java.util.*;
/**
* @author Rodney Waldhoff
* @version $Id: TestCursorableLinkedList.java,v 1.4 2002/02/25 23:51:24 morgand Exp $
* @version $Id: TestCursorableLinkedList.java,v 1.5 2002/06/18 05:35:58 mas Exp $
*/
public class TestCursorableLinkedList extends TestList {
public TestCursorableLinkedList(String testName) {
@ -74,7 +74,7 @@ public class TestCursorableLinkedList extends TestList {
}
public static Test suite() {
return new TestSuite(TestCursorableLinkedList.class);
return BulkTest.makeSuite(TestCursorableLinkedList.class);
}
public static void main(String args[]) {

View File

@ -1,7 +1,7 @@
/*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestDoubleOrderedMap.java,v 1.4 2002/05/28 06:51:03 mas Exp $
* $Revision: 1.4 $
* $Date: 2002/05/28 06:51:03 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestDoubleOrderedMap.java,v 1.5 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.5 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -95,7 +95,7 @@ public class TestDoubleOrderedMap extends TestMap {
* @return the test suite
*/
public static Test suite() {
return new TestSuite(TestDoubleOrderedMap.class);
return BulkTest.makeSuite(TestDoubleOrderedMap.class);
}
/**

View File

@ -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.4 2002/02/26 00:31:32 morgand Exp $
* $Revision: 1.4 $
* $Date: 2002/02/26 00:31:32 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastHashMap.java,v 1.5 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.5 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -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.4 2002/02/26 00:31:32 morgand Exp $
* @version $Id: TestFastHashMap.java,v 1.5 2002/06/18 05:35:58 mas Exp $
*/
public class TestFastHashMap extends TestHashMap
{
@ -80,7 +80,7 @@ public class TestFastHashMap extends TestHashMap
public static Test suite()
{
return new TestSuite(TestFastHashMap.class);
return BulkTest.makeSuite(TestFastHashMap.class);
}
public static void main(String args[])

View File

@ -1,7 +1,7 @@
/*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastHashMap1.java,v 1.2 2002/02/22 02:18:50 mas Exp $
* $Revision: 1.2 $
* $Date: 2002/02/22 02:18:50 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastHashMap1.java,v 1.3 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.3 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -71,7 +71,7 @@ import java.util.Map;
* Test FastHashMap in <strong>fast</strong> mode.
*
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
* @version $Id: TestFastHashMap1.java,v 1.2 2002/02/22 02:18:50 mas Exp $
* @version $Id: TestFastHashMap1.java,v 1.3 2002/06/18 05:35:58 mas Exp $
*/
public class TestFastHashMap1 extends TestFastHashMap
{
@ -82,7 +82,7 @@ public class TestFastHashMap1 extends TestFastHashMap
public static Test suite()
{
return new TestSuite(TestFastHashMap1.class);
return BulkTest.makeSuite(TestFastHashMap1.class);
}
public static void main(String args[])

View File

@ -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.5 2002/02/26 00:31:32 morgand Exp $
* $Revision: 1.5 $
* $Date: 2002/02/26 00:31:32 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastTreeMap.java,v 1.6 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.6 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -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.5 2002/02/26 00:31:32 morgand Exp $
* @version $Id: TestFastTreeMap.java,v 1.6 2002/06/18 05:35:58 mas Exp $
*/
public class TestFastTreeMap extends TestTreeMap
{
@ -80,7 +80,7 @@ public class TestFastTreeMap extends TestTreeMap
public static Test suite()
{
return new TestSuite(TestFastTreeMap.class);
return BulkTest.makeSuite(TestFastTreeMap.class);
}
public static void main(String args[])

View File

@ -1,7 +1,7 @@
/*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastTreeMap1.java,v 1.2 2002/02/22 02:18:50 mas Exp $
* $Revision: 1.2 $
* $Date: 2002/02/22 02:18:50 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastTreeMap1.java,v 1.3 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.3 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -71,7 +71,7 @@ import java.util.TreeMap;
* Test FastTreeMap in <strong>fast</strong> mode.
*
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
* @version $Id: TestFastTreeMap1.java,v 1.2 2002/02/22 02:18:50 mas Exp $
* @version $Id: TestFastTreeMap1.java,v 1.3 2002/06/18 05:35:58 mas Exp $
*/
public class TestFastTreeMap1 extends TestFastTreeMap
{
@ -82,7 +82,7 @@ public class TestFastTreeMap1 extends TestFastTreeMap
public static Test suite()
{
return new TestSuite(TestFastTreeMap1.class);
return BulkTest.makeSuite(TestFastTreeMap1.class);
}
public static void main(String args[])

View File

@ -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.21 2002/05/28 06:51:03 mas Exp $
* $Revision: 1.21 $
* $Date: 2002/05/28 06:51:03 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestLRUMap.java,v 1.22 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.22 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -74,7 +74,7 @@ import java.util.Set;
*
* @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.21 2002/05/28 06:51:03 mas Exp $
* @version $Id: TestLRUMap.java,v 1.22 2002/06/18 05:35:58 mas Exp $
*/
public class TestLRUMap extends TestSequencedHashMap
{
@ -83,7 +83,7 @@ public class TestLRUMap extends TestSequencedHashMap
}
public static Test suite() {
return new TestSuite(TestLRUMap.class);
return BulkTest.makeSuite(TestLRUMap.class);
}
public static void main(String args[]) {

View File

@ -86,7 +86,7 @@ public class TestSequencedHashMap extends TestMap {
}
public static Test suite() {
return new TestSuite(TestSequencedHashMap.class);
return BulkTest.makeSuite(TestSequencedHashMap.class);
}
// current versions of SequencedHashMap and subclasses are not

View File

@ -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.2 2002/02/26 00:31:32 morgand Exp $
* $Revision: 1.2 $
* $Date: 2002/02/26 00:31:32 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestSoftRefHashMap.java,v 1.3 2002/06/18 05:35:58 mas Exp $
* $Revision: 1.3 $
* $Date: 2002/06/18 05:35:58 $
*
* ====================================================================
*
@ -69,9 +69,9 @@ import java.util.HashMap;
/**
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
* @version $Id: TestSoftRefHashMap.java,v 1.2 2002/02/26 00:31:32 morgand Exp $
* @version $Id: TestSoftRefHashMap.java,v 1.3 2002/06/18 05:35:58 mas Exp $
*/
public class TestSoftRefHashMap extends TestHashMap
public class TestSoftRefHashMap extends TestMap
{
public TestSoftRefHashMap(String testName) {
super(testName);
@ -91,8 +91,4 @@ public class TestSoftRefHashMap extends TestHashMap
return map;
}
public void setUp() {
map = (HashMap) makeEmptyMap();
}
}