summaryrefslogtreecommitdiffstats
path: root/luni/src
diff options
context:
space:
mode:
authorDaniel Xie <dxie@google.com>2015-07-01 17:18:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-07-01 17:18:48 +0000
commita17cd65642e7f47b9ea23721c099d499ed4ec9f3 (patch)
tree6d14b112557bd4852ff81d816cad6c90803de034 /luni/src
parenteeb2a73b5fc3e22261d956b7ff937371f5099a4e (diff)
parent2e2e29c3e70abebaf4e56cadffeed37ccf862836 (diff)
downloadlibcore-a17cd65642e7f47b9ea23721c099d499ed4ec9f3.zip
libcore-a17cd65642e7f47b9ea23721c099d499ed4ec9f3.tar.gz
libcore-a17cd65642e7f47b9ea23721c099d499ed4ec9f3.tar.bz2
Merge "Explicitly set DateFormat.is24Hour value needed by tests" into lollipop-mr1-cts-dev
Diffstat (limited to 'luni/src')
-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 {