diff options
author | Brett Chabot <brettchabot@android.com> | 2010-10-05 11:05:37 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-05 11:05:37 -0700 |
commit | 111a4135d84485eff85bbca6a96cd91886deb7ba (patch) | |
tree | ea7da00aeb86d9b9d14773213e037e114a84356a /tests | |
parent | 41170a1a05830e6c9ec631d73043ccf1878dc0f9 (diff) | |
parent | b9a40068b590b86904b40bf466571b140d0f94b4 (diff) | |
download | frameworks_base-111a4135d84485eff85bbca6a96cd91886deb7ba.zip frameworks_base-111a4135d84485eff85bbca6a96cd91886deb7ba.tar.gz frameworks_base-111a4135d84485eff85bbca6a96cd91886deb7ba.tar.bz2 |
am b9a40068: Merge "Failing test cleanup." into gingerbread
Merge commit 'b9a40068b590b86904b40bf466571b140d0f94b4' into gingerbread-plus-aosp
* commit 'b9a40068b590b86904b40bf466571b140d0f94b4':
Failing test cleanup.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CoreTests/android/core/MiscRegressionTest.java | 31 |
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 |