Disable sub map serializable tests

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131647 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2004-04-09 15:17:11 +00:00
parent a61511a01b
commit 64c1bc3bb0
3 changed files with 16 additions and 8 deletions

View File

@ -37,7 +37,7 @@ import java.io.Serializable;
* you may still use this base set of cases. Simply override the
* test case (method) your {@link Object} fails.
*
* @version $Revision: 1.4 $ $Date: 2004/02/18 01:20:35 $
* @version $Revision: 1.5 $ $Date: 2004/04/09 15:17:11 $
*
* @author Rodney Waldhoff
* @author Stephen Colebourne
@ -144,7 +144,7 @@ public abstract class AbstractTestObject extends BulkTest {
* @throws IOException
* @throws ClassNotFoundException
*/
public void testSimpleSerialization() throws IOException, ClassNotFoundException {
public void testSimpleSerialization() throws Exception {
Object o = makeObject();
if (o instanceof Serializable) {
byte[] objekt = writeExternalFormToBytes((Serializable) o);

View File

@ -28,7 +28,7 @@ import org.apache.commons.collections.SortedBidiMap;
/**
* JUnit tests.
*
* @version $Revision: 1.3 $ $Date: 2004/02/18 01:20:39 $
* @version $Revision: 1.4 $ $Date: 2004/04/09 15:15:18 $
*
* @author Stephen Colebourne
*/
@ -46,6 +46,7 @@ public class TestUnmodifiableSortedBidiMap extends AbstractTestSortedBidiMap {
super(testName);
}
//-----------------------------------------------------------------------
public BidiMap makeEmptyBidiMap() {
return UnmodifiableSortedBidiMap.decorate(new DualTreeBidiMap());
}
@ -66,13 +67,16 @@ public class TestUnmodifiableSortedBidiMap extends AbstractTestSortedBidiMap {
return new TreeMap();
}
/**
* Override to prevent infinite recursion of tests.
*/
public boolean isSubMapViewsSerializable() {
// TreeMap sub map views have a bug in deserialization.
return false;
}
public String[] ignoredTests() {
// Override to prevent infinite recursion of tests.
return new String[] {"TestUnmodifiableSortedBidiMap.bulkTestInverseMap.bulkTestInverseMap"};
}
//-----------------------------------------------------------------------
public boolean isAllowNullKey() {
return false;
}

View File

@ -28,7 +28,7 @@ import org.apache.commons.collections.BulkTest;
/**
* Abstract test class for {@link java.util.SortedMap} methods and contracts.
*
* @version $Revision: 1.7 $ $Date: 2004/04/09 15:04:29 $
* @version $Revision: 1.8 $ $Date: 2004/04/09 15:17:11 $
*
* @author Stephen Colebourne
*/
@ -161,6 +161,10 @@ public abstract class AbstractTestSortedMap extends AbstractTestMap {
public boolean supportsFullCollections() {
return false;
}
public void testSimpleSerialization() throws Exception {
if (main.isSubMapViewsSerializable() == false) return;
super.testSimpleSerialization();
}
public void testSerializeDeserializeThenCompare() throws Exception {
if (main.isSubMapViewsSerializable() == false) return;
super.testSerializeDeserializeThenCompare();