Changeset 12422 in josm for trunk/test/unit
- Timestamp:
- 2017-06-22T01:07:31+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java
r12421 r12422 76 76 assertEquals(numCoor, in.getNumberOfCoordinates()); 77 77 assertEquals(0, in.getParserMalformed()); 78 assertEquals( in.data.dataSources, gpx.dataSources);78 assertEquals(gpx.dataSources, in.data.dataSources); 79 79 assertEquals(1, gpx.tracks.size()); 80 80 assertEquals(1, in.data.tracks.size()); … … 82 82 GpxTrack nmeaTrack = in.data.tracks.iterator().next(); 83 83 assertEquals(gpxTrack.getBounds(), nmeaTrack.getBounds()); 84 assertEquals(1, gpxTrack.getSegments().size()); 85 assertEquals(1, nmeaTrack.getSegments().size()); 86 GpxTrackSegment gpxSeg = gpxTrack.getSegments().iterator().next(); 87 GpxTrackSegment nmeaSeg = nmeaTrack.getSegments().iterator().next(); 88 assertEquals(gpxSeg.getBounds(), nmeaSeg.getBounds()); 89 assertEquals(numCoor, gpxSeg.getWayPoints().size()); 90 assertEquals(numCoor, nmeaSeg.getWayPoints().size()); 91 WayPoint gpxWpt = gpxSeg.getWayPoints().iterator().next(); 92 WayPoint nmeaWpt = nmeaSeg.getWayPoints().iterator().next(); 93 assertEquals(gpxWpt.getCoor().getRoundedToOsmPrecision(), nmeaWpt.getCoor().getRoundedToOsmPrecision()); 84 int nTracks = gpxTrack.getSegments().size(); 85 assertEquals(nTracks, nmeaTrack.getSegments().size()); 86 if (nTracks > 0) { 87 GpxTrackSegment gpxSeg = gpxTrack.getSegments().iterator().next(); 88 GpxTrackSegment nmeaSeg = nmeaTrack.getSegments().iterator().next(); 89 assertEquals(gpxSeg.getBounds(), nmeaSeg.getBounds()); 90 assertEquals(numCoor, gpxSeg.getWayPoints().size()); 91 assertEquals(numCoor, nmeaSeg.getWayPoints().size()); 92 WayPoint gpxWpt = gpxSeg.getWayPoints().iterator().next(); 93 WayPoint nmeaWpt = nmeaSeg.getWayPoints().iterator().next(); 94 assertEquals(gpxWpt.getCoor().getRoundedToOsmPrecision(), nmeaWpt.getCoor().getRoundedToOsmPrecision()); 95 } 94 96 } 95 97 … … 133 135 compareWithReference(2147, "WG20080203171807.log", 487); 134 136 } 137 138 /** 139 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14924">Bug #14924</a>. 140 * @throws Exception if an error occurs 141 */ 142 @Test 143 public void testTicket14924() throws Exception { 144 compareWithReference(14924, "input", 0); 145 } 135 146 }
Note:
See TracChangeset
for help on using the changeset viewer.