summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorDaniel Xie <dxie@google.com>2015-07-02 01:36:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-02 01:36:19 +0000
commit21b7f1d3626b43453e150625a5f3909221d09035 (patch)
tree53588003bee15e61482079b03c7c580ba8f8ea9f /luni
parent6c1317441f37076ecdcf826065cee786b6bb83f9 (diff)
parent45c2f8a384ab789ac0410a02debe32d56105ae96 (diff)
downloadlibcore-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')
-rw-r--r--luni/src/test/java/libcore/java/text/OldDateFormatTest.java6
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 {