summaryrefslogtreecommitdiffstats
path: root/core/tests/coretests
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2012-07-21 12:37:26 -0700
committerJeff Sharkey <jsharkey@android.com>2012-07-21 12:39:48 -0700
commiteaaf396169abdbd213565cacb37dc0c9c391b365 (patch)
treecef3fb9ab6b792522c2261a4249b410f18ad7f0d /core/tests/coretests
parent971a3cfa51b89aa0f3ab47ee082f05586a1f16f0 (diff)
downloadframeworks_base-eaaf396169abdbd213565cacb37dc0c9c391b365.zip
frameworks_base-eaaf396169abdbd213565cacb37dc0c9c391b365.tar.gz
frameworks_base-eaaf396169abdbd213565cacb37dc0c9c391b365.tar.bz2
Avoid emitting broken ASCII.
Bug: 6131887 Change-Id: Iff13573aad8128cc7ae3613ab718c81e6d0862a1
Diffstat (limited to 'core/tests/coretests')
-rw-r--r--core/tests/coretests/src/android/util/TimeUtilsTest.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/tests/coretests/src/android/util/TimeUtilsTest.java b/core/tests/coretests/src/android/util/TimeUtilsTest.java
index 8d9f8e5..74c8e04 100644
--- a/core/tests/coretests/src/android/util/TimeUtilsTest.java
+++ b/core/tests/coretests/src/android/util/TimeUtilsTest.java
@@ -18,8 +18,6 @@ package android.util;
import junit.framework.TestCase;
-import android.util.TimeUtils;
-
import java.util.Calendar;
import java.util.TimeZone;
@@ -442,6 +440,13 @@ public class TimeUtilsTest extends TestCase {
assertFormatDuration("+10s24ms", 10024);
}
+ public void testFormatHugeDuration() {
+ //assertFormatDuration("+15542d1h11m11s555ms", 1342833071555L);
+ // TODO: improve formatDuration() API
+ assertFormatDuration("+999d23h59m59s999ms", 1342833071555L);
+ assertFormatDuration("-999d23h59m59s999ms", -1342833071555L);
+ }
+
private void assertFormatDuration(String expected, long duration) {
StringBuilder sb = new StringBuilder();
TimeUtils.formatDuration(duration, sb);