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 * you may still use this base set of cases. Simply override the
* test case (method) your {@link Object} fails. * 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 Rodney Waldhoff
* @author Stephen Colebourne * @author Stephen Colebourne
@ -144,7 +144,7 @@ public abstract class AbstractTestObject extends BulkTest {
* @throws IOException * @throws IOException
* @throws ClassNotFoundException * @throws ClassNotFoundException
*/ */
public void testSimpleSerialization() throws IOException, ClassNotFoundException { public void testSimpleSerialization() throws Exception {
Object o = makeObject(); Object o = makeObject();
if (o instanceof Serializable) { if (o instanceof Serializable) {
byte[] objekt = writeExternalFormToBytes((Serializable) o); byte[] objekt = writeExternalFormToBytes((Serializable) o);

View File

@ -28,7 +28,7 @@ import org.apache.commons.collections.SortedBidiMap;
/** /**
* JUnit tests. * 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 * @author Stephen Colebourne
*/ */
@ -46,6 +46,7 @@ public class TestUnmodifiableSortedBidiMap extends AbstractTestSortedBidiMap {
super(testName); super(testName);
} }
//-----------------------------------------------------------------------
public BidiMap makeEmptyBidiMap() { public BidiMap makeEmptyBidiMap() {
return UnmodifiableSortedBidiMap.decorate(new DualTreeBidiMap()); return UnmodifiableSortedBidiMap.decorate(new DualTreeBidiMap());
} }
@ -66,13 +67,16 @@ public class TestUnmodifiableSortedBidiMap extends AbstractTestSortedBidiMap {
return new TreeMap(); return new TreeMap();
} }
/** public boolean isSubMapViewsSerializable() {
* Override to prevent infinite recursion of tests. // TreeMap sub map views have a bug in deserialization.
*/ return false;
}
public String[] ignoredTests() { public String[] ignoredTests() {
// Override to prevent infinite recursion of tests.
return new String[] {"TestUnmodifiableSortedBidiMap.bulkTestInverseMap.bulkTestInverseMap"}; return new String[] {"TestUnmodifiableSortedBidiMap.bulkTestInverseMap.bulkTestInverseMap"};
} }
//-----------------------------------------------------------------------
public boolean isAllowNullKey() { public boolean isAllowNullKey() {
return false; 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. * 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 * @author Stephen Colebourne
*/ */
@ -161,6 +161,10 @@ public abstract class AbstractTestSortedMap extends AbstractTestMap {
public boolean supportsFullCollections() { public boolean supportsFullCollections() {
return false; return false;
} }
public void testSimpleSerialization() throws Exception {
if (main.isSubMapViewsSerializable() == false) return;
super.testSimpleSerialization();
}
public void testSerializeDeserializeThenCompare() throws Exception { public void testSerializeDeserializeThenCompare() throws Exception {
if (main.isSubMapViewsSerializable() == false) return; if (main.isSubMapViewsSerializable() == false) return;
super.testSerializeDeserializeThenCompare(); super.testSerializeDeserializeThenCompare();