summaryrefslogtreecommitdiffstats
path: root/tests/CoreTests
diff options
context:
space:
mode:
authorBrett Chabot <brettchabot@android.com>2010-10-04 19:55:14 -0700
committerBrett Chabot <brettchabot@android.com>2010-10-04 19:55:14 -0700
commit2ad24f944ee68c6e14f3a214f0eef60f8cdb9eb8 (patch)
treee07f7761b2a97e9b383eb4e297e32f2d591a6b4a /tests/CoreTests
parenteb6e22f29ded58e7e51702c34878fd01e20ff802 (diff)
downloadframeworks_base-2ad24f944ee68c6e14f3a214f0eef60f8cdb9eb8.zip
frameworks_base-2ad24f944ee68c6e14f3a214f0eef60f8cdb9eb8.tar.gz
frameworks_base-2ad24f944ee68c6e14f3a214f0eef60f8cdb9eb8.tar.bz2
Failing test cleanup.
Change-Id: I7cabc6ff2ec1fcb80dede5da03b03622a5bae021
Diffstat (limited to 'tests/CoreTests')
-rw-r--r--tests/CoreTests/android/core/MiscRegressionTest.java31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/CoreTests/android/core/MiscRegressionTest.java b/tests/CoreTests/android/core/MiscRegressionTest.java
index 8281db0..7734397 100644
--- a/tests/CoreTests/android/core/MiscRegressionTest.java
+++ b/tests/CoreTests/android/core/MiscRegressionTest.java
@@ -66,37 +66,6 @@ public class MiscRegressionTest extends TestCase {
}
}
- // Regression test for #1061945: negative Shorts do not
- // serialize/deserialize correctly
- @SmallTest
- public void testShortSerialization() throws Exception {
- // create an instance of ObjectInputStream
- String x = new String("serialize_foobar");
- java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
- (new java.io.ObjectOutputStream(baos)).writeObject(x);
- ObjectInputStream ois = new java.io.ObjectInputStream(
- new java.io.ByteArrayInputStream(baos.toByteArray()));
-
- // get the setField(...,, short val) method in question
- Class<ObjectInputStream> oClass = ObjectInputStream.class;
- Method m = oClass.getDeclaredMethod("setField", new Class[] { Object.class, Class.class, String.class, short.class});
- // compose args
- short start = 123;
- short origval = -1; // 0xffff
- Short obj = new Short(start);
- Class<Short> declaringClass = Short.class;
- String fieldDescName = "value";
-
- // test the initial value
- assertEquals(obj.shortValue(), start);
- // invoke native method to set the field "value" of type short to the newval
- m.setAccessible(true); // since the method is private
- m.invoke(ois, new Object[]{ obj, declaringClass, fieldDescName, new Short(origval)} );
- // test the set value
- short res = obj.shortValue();
- assertEquals("Read and written values must be equal", origval, res);
- }
-
// Regression test for #951285: Suitable LogHandler should be chosen
// depending on the environment.
@MediumTest