Skip to content
Snippets Groups Projects
Commit d0a23eb1 authored by Lalit Kansara's avatar Lalit Kansara
Browse files

P PPR1.171228.001 merge 190310c6 - clean

Change-Id: I3f4b520484b73df15f177b18ca3b94f0b92bcee3
parents 8a6324a6 190310c6
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,9 @@ import com.android.loganalysis.item.BatteryStatsSummaryInfoItem;
import junit.framework.TestCase;
import java.util.Arrays;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.TimeZone;
/**
* Unit tests for {@link BatteryStatsSummaryInfoParser}
......@@ -83,8 +85,14 @@ public class BatteryStatsSummaryInfoParserTest extends TestCase {
assertEquals("The battery dropped a level 24 mins on average",
summary.getBatteryDischargeRate());
assertEquals("The peak discharge time was during Tue Dec 09 16:31:07 PST 2014 to "
+ "Tue Dec 09 19:35:52 PST 2014 where battery dropped from 89 to 80",
// Get the current timezone short name (PST, GMT) to properly output the time as expected.
String timezone =
new GregorianCalendar().getTimeZone().getDisplayName(false, TimeZone.SHORT);
assertEquals(
String.format(
"The peak discharge time was during Tue Dec 09 16:31:07 %s 2014 to "
+ "Tue Dec 09 19:35:52 %s 2014 where battery dropped from 89 to 80",
timezone, timezone),
summary.getPeakDischargeTime());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment