diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-11 12:11:54 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-11 12:11:54 -0700 |
commit | ab28398a565e5ce8a56cdfd50ac6226e5317cf66 (patch) | |
tree | 589d7add2659de2974805a9def858204999f1fa7 /support | |
parent | 7a237c50c718d326c49da2a449ba6eb0c668837a (diff) | |
download | libcore-ab28398a565e5ce8a56cdfd50ac6226e5317cf66.zip libcore-ab28398a565e5ce8a56cdfd50ac6226e5317cf66.tar.gz libcore-ab28398a565e5ce8a56cdfd50ac6226e5317cf66.tar.bz2 |
auto import from //branches/cupcake/...@137873
Diffstat (limited to 'support')
3 files changed, 16 insertions, 12 deletions
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/cert/TestUtils.java b/support/src/test/java/org/apache/harmony/security/tests/support/cert/TestUtils.java index 5d9a6bd..6f9cbd2 100644 --- a/support/src/test/java/org/apache/harmony/security/tests/support/cert/TestUtils.java +++ b/support/src/test/java/org/apache/harmony/security/tests/support/cert/TestUtils.java @@ -545,6 +545,7 @@ public class TestUtils { // Second example /** * Certificate: + * <pre> Data: Version: 3 (0x2) Serial Number: 0 (0x0) @@ -588,6 +589,7 @@ public class TestUtils { 99:1c:f5:cb:77:86:36:cd:43:37:99:09:c2:9a:d8:f2:28:05: 06:0c + * </pre> */ public static final String rootCert = "-----BEGIN CERTIFICATE-----\n" + "MIIDGzCCAoSgAwIBAgIBADANBgkqhkiG9w0BAQUFADBtMQswCQYDVQQGEwJBTjEQ\n" + @@ -631,6 +633,7 @@ public class TestUtils { /** * Certificate: + * <pre> Data: Version: 3 (0x2) Serial Number: 1 (0x1) @@ -673,6 +676,7 @@ public class TestUtils { ba:b4:a2:c7:2c:cb:b1:3a:c2:d8:0c:21:31:ee:68:7e:97:ce: 98:22:2e:c6:cf:f0:1a:11:04:ca:9a:06:de:98:48:85:ac:6c: 6f:98 + * </pre> */ public static final String endCert = "-----BEGIN CERTIFICATE-----\n" + diff --git a/support/src/test/java/org/apache/harmony/testframework/serialization/SerializationTest.java b/support/src/test/java/org/apache/harmony/testframework/serialization/SerializationTest.java index 9db5382..34b5f0d 100644 --- a/support/src/test/java/org/apache/harmony/testframework/serialization/SerializationTest.java +++ b/support/src/test/java/org/apache/harmony/testframework/serialization/SerializationTest.java @@ -534,13 +534,13 @@ public abstract class SerializationTest extends TestCase { private static Serializable getObject(TestCase test, String toAppend) throws Exception { - StringBuilder path = new StringBuilder("serialization"); + StringBuilder path = new StringBuilder("/serialization"); path.append(File.separatorChar); path.append(test.getClass().getName().replace('.', File.separatorChar)); path.append(toAppend); - InputStream in = ClassLoader.getSystemClassLoader() + InputStream in = SerializationTest.class .getResourceAsStream(path.toString()); Assert.assertNotNull("Failed to load serialization resource file: " diff --git a/support/src/test/java/tests/support/Support_SimpleDateFormat.java b/support/src/test/java/tests/support/Support_SimpleDateFormat.java index 93257da..a90a4d0 100644 --- a/support/src/test/java/tests/support/Support_SimpleDateFormat.java +++ b/support/src/test/java/tests/support/Support_SimpleDateFormat.java @@ -96,10 +96,10 @@ public class Support_SimpleDateFormat extends Support_Format { // test with simple example format.applyPattern("h:m z"); - super.text = "5:19 EDT"; + super.text = "5:19 GMT-05:00"; t_FormatWithField(21, format, date, null, Field.HOUR1, 0, 1); t_FormatWithField(22, format, date, null, Field.MINUTE, 2, 4); - t_FormatWithField(23, format, date, null, Field.TIME_ZONE, 5, 8); + t_FormatWithField(23, format, date, null, Field.TIME_ZONE, 5, 14); // test fields that are not included in the formatted text @@ -125,14 +125,14 @@ public class Support_SimpleDateFormat extends Support_Format { // test with simple example with pattern char Z format.applyPattern("h:m Z z"); - super.text = "5:19 -0400 EDT"; + super.text = "5:19 -0400 GMT-05:00"; t_FormatWithField(40, format, date, null, Field.HOUR1, 0, 1); t_FormatWithField(41, format, date, null, Field.MINUTE, 2, 4); t_FormatWithField(42, format, date, null, Field.TIME_ZONE, 5, 10); } public void t_formatToCharacterIterator() { - TimeZone tz = TimeZone.getTimeZone("EST"); + TimeZone tz = TimeZone.getTimeZone("GMT-05:00"); Calendar cal = new GregorianCalendar(tz); cal.set(1999, Calendar.SEPTEMBER, 13, 17, 19, 01); cal.set(Calendar.MILLISECOND, 0); @@ -184,11 +184,11 @@ public class Support_SimpleDateFormat extends Support_Format { } private Vector<FieldContainer> getDateVector3() { - // "5:19 EDT" + // "5:19 GMT-05:00" Vector<FieldContainer> v = new Vector<FieldContainer>(); v.add(new FieldContainer(0, 1, Field.HOUR1)); v.add(new FieldContainer(2, 4, Field.MINUTE)); - v.add(new FieldContainer(5, 8, Field.TIME_ZONE)); + v.add(new FieldContainer(5, 14, Field.TIME_ZONE)); return v; } @@ -208,7 +208,7 @@ public class Support_SimpleDateFormat extends Support_Format { // 05 // 005 19 019 1 01 001 0 00 000 Mon Monday 256 256 256 2 02 38 038 3 003 // PM - // PM 5 005 EDT Eastern Daylight Time -0400 -0400" + // PM 5 005 GMT-05:00 GMT-05:00 -0500 -0500" v.add(new FieldContainer(0, 2, Field.ERA)); v.add(new FieldContainer(3, 5, Field.ERA)); v.add(new FieldContainer(6, 8, Field.YEAR)); @@ -253,10 +253,10 @@ public class Support_SimpleDateFormat extends Support_Format { v.add(new FieldContainer(145, 147, Field.AM_PM)); v.add(new FieldContainer(149, 150, Field.HOUR0)); v.add(new FieldContainer(151, 154, Field.HOUR0)); - v.add(new FieldContainer(155, 158, Field.TIME_ZONE)); - v.add(new FieldContainer(159, 180, Field.TIME_ZONE)); + v.add(new FieldContainer(155, 164, Field.TIME_ZONE)); + v.add(new FieldContainer(165, 174, Field.TIME_ZONE)); + v.add(new FieldContainer(175, 180, Field.TIME_ZONE)); v.add(new FieldContainer(181, 186, Field.TIME_ZONE)); - v.add(new FieldContainer(187, 192, Field.TIME_ZONE)); return v; } |