Fix an error of TripStatisticsUpdaterTest.

This commit is contained in:
youtaol
2013-05-13 18:05:38 +08:00
parent d911419cf2
commit 61bcf078a9
@@ -309,8 +309,9 @@ public class TripStatisticsUpdaterTest extends TestCase {
private void addLocations(int points, long startTime, TripStatistics tripStatistics, private void addLocations(int points, long startTime, TripStatistics tripStatistics,
int timeOffset, int locationOffset) { int timeOffset, int locationOffset) {
for (int i = 0; i < points; i++) { for (int i = 0; i < points; i++) {
Location location = getLocation(i + locationOffset, (i + locationOffset) * .001, // 99999 means a speed should bigger than given speed.
MOVING_SPEED, startTime + (timeOffset + i) * TEN_SECONDS); Location location = getLocation(i + locationOffset, (i + locationOffset) * .001, 99999,
startTime + (timeOffset + i) * TEN_SECONDS);
tripStatisticsUpdater.addLocation(location, PreferencesUtils.MIN_RECORDING_DISTANCE_DEFAULT); tripStatisticsUpdater.addLocation(location, PreferencesUtils.MIN_RECORDING_DISTANCE_DEFAULT);
tripStatistics = tripStatisticsUpdater.getTripStatistics(); tripStatistics = tripStatisticsUpdater.getTripStatistics();