forked from upstream-mirrors/OpenTracks
Merge heads
This commit is contained in:
@@ -29,7 +29,7 @@ limitations under the License.
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
android:targetSdkVersion="15" />
|
||||
android:targetSdkVersion="16" />
|
||||
|
||||
<application
|
||||
android:label="My Tracks Tests" >
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
# Project target.
|
||||
target=Google Inc.:Google APIs:15
|
||||
target=Google Inc.:Google APIs:16
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@ public class CreateAndSendTrackTest extends ActivityInstrumentationTestCase2<Tra
|
||||
if (EndToEndTestUtils.hasActionBar) {
|
||||
// Check the title is Recording.
|
||||
assertTrue(EndToEndTestUtils.SOLO.searchText(activityMyTracks
|
||||
.getString(R.string.icon_recording)));
|
||||
.getString(R.string.generic_recording)));
|
||||
}
|
||||
|
||||
createWaypoint();
|
||||
|
||||
@@ -237,6 +237,34 @@ public class TrackWriterTest extends AndroidTestCase {
|
||||
mocksControl.verify();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests when a track only contains invalid locations. Make sure an empty
|
||||
* track is written.
|
||||
*/
|
||||
public void testWriteDocument_oneInvalidLocation() throws Exception {
|
||||
writer = new TrackWriterImpl(getContext(), providerUtils, track, formatWriter);
|
||||
|
||||
Location[] locs = { new Location("fake0") };
|
||||
fillLocations(locs);
|
||||
|
||||
// Make location invalid
|
||||
locs[0].setLatitude(100);
|
||||
|
||||
assertEquals(locs.length, providerUtils.bulkInsertTrackPoint(locs, locs.length, TRACK_ID));
|
||||
|
||||
formatWriter.writeHeader();
|
||||
formatWriter.writeBeginTrack(null);
|
||||
formatWriter.writeEndTrack(null);
|
||||
formatWriter.writeFooter();
|
||||
formatWriter.close();
|
||||
|
||||
mocksControl.replay();
|
||||
writer.writeDocument();
|
||||
|
||||
assertTrue(writer.wasSuccess());
|
||||
mocksControl.verify();
|
||||
}
|
||||
|
||||
public void testWriteDocument() throws Exception {
|
||||
writer = new TrackWriterImpl(getContext(), providerUtils, track, formatWriter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user