Merge "Fix BatteryInfo test fail" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a0ada5af53
@@ -150,9 +150,10 @@ public class BatteryInfoTest {
|
|||||||
mBatteryUsageStats, estimate, SystemClock.elapsedRealtime() * 1000,
|
mBatteryUsageStats, estimate, SystemClock.elapsedRealtime() * 1000,
|
||||||
true /* shortString */);
|
true /* shortString */);
|
||||||
|
|
||||||
// Both long and short strings should not have extra text
|
// We only add special mention for the long string
|
||||||
assertThat(info.remainingLabel.toString()).doesNotContain(ENHANCED_STRING_SUFFIX);
|
assertThat(info.remainingLabel.toString()).contains(ENHANCED_STRING_SUFFIX);
|
||||||
assertThat(info.suggestionLabel).contains(BATTERY_RUN_OUT_PREFIX);
|
assertThat(info.suggestionLabel).contains(BATTERY_RUN_OUT_PREFIX);
|
||||||
|
// shortened string should not have extra text
|
||||||
assertThat(info2.remainingLabel.toString()).doesNotContain(ENHANCED_STRING_SUFFIX);
|
assertThat(info2.remainingLabel.toString()).doesNotContain(ENHANCED_STRING_SUFFIX);
|
||||||
assertThat(info2.suggestionLabel).contains(BATTERY_RUN_OUT_PREFIX);
|
assertThat(info2.suggestionLabel).contains(BATTERY_RUN_OUT_PREFIX);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user