diff options
author | Daniel Xie <dxie@google.com> | 2015-07-02 01:36:19 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-02 01:36:19 +0000 |
commit | 21b7f1d3626b43453e150625a5f3909221d09035 (patch) | |
tree | 53588003bee15e61482079b03c7c580ba8f8ea9f /luni/src/test/java | |
parent | 6c1317441f37076ecdcf826065cee786b6bb83f9 (diff) | |
parent | 45c2f8a384ab789ac0410a02debe32d56105ae96 (diff) | |
download | libcore-21b7f1d3626b43453e150625a5f3909221d09035.zip libcore-21b7f1d3626b43453e150625a5f3909221d09035.tar.gz libcore-21b7f1d3626b43453e150625a5f3909221d09035.tar.bz2 |
am 45c2f8a3: am a17cd656: Merge "Explicitly set DateFormat.is24Hour value needed by tests" into lollipop-mr1-cts-dev
* commit '45c2f8a384ab789ac0410a02debe32d56105ae96':
Explicitly set DateFormat.is24Hour value needed by tests
Diffstat (limited to 'luni/src/test/java')
-rw-r--r-- | luni/src/test/java/libcore/java/text/OldDateFormatTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/luni/src/test/java/libcore/java/text/OldDateFormatTest.java b/luni/src/test/java/libcore/java/text/OldDateFormatTest.java index df388d3..1bd1d0c 100644 --- a/luni/src/test/java/libcore/java/text/OldDateFormatTest.java +++ b/luni/src/test/java/libcore/java/text/OldDateFormatTest.java @@ -86,6 +86,8 @@ public class OldDateFormatTest extends junit.framework.TestCase { */ public void test_formatLjava_util_Date() { try { + // This test assumes a default DateFormat.is24Hour setting. + DateFormat.is24Hour = null; DateFormat format = DateFormat.getDateTimeInstance( DateFormat.SHORT, DateFormat.SHORT, Locale.US); Date current = new Date(); @@ -104,6 +106,8 @@ public class OldDateFormatTest extends junit.framework.TestCase { */ public void test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() { try { + // This test assumes a default DateFormat.is24Hour setting. + DateFormat.is24Hour = null; DateFormat format = DateFormat.getDateTimeInstance( DateFormat.SHORT, DateFormat.SHORT, Locale.US); Date current = new Date(); @@ -204,6 +208,8 @@ public class OldDateFormatTest extends junit.framework.TestCase { * java.text.DateFormat#parse(String) */ public void test_parseLString() throws Exception { + // This test assumes a default DateFormat.is24Hour setting. + DateFormat.is24Hour = null; DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.US); try { |