Changeset 19539 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2026-02-20T22:21:27+01:00 (22 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java
r19321 r19539 84 84 } 85 85 86 private static void compareWithReference(int ticket, String filename, int numCoor) throws IOException, SAXException { 86 private static void compareWithReference(int ticket, String filename, int numCoor, int parseErrors) throws IOException, SAXException { 87 87 GpxData gpx = GpxReaderTest.parseGpxData(TestUtils.getRegressionDataFile(ticket, filename+".gpx")); 88 88 NmeaReader in = new NmeaReader(Files.newInputStream(Paths.get(TestUtils.getRegressionDataFile(ticket, filename+".nmea")))); 89 89 in.parse(true); 90 90 assertEquals(numCoor, in.getNumberOfCoordinates()); 91 assertEquals( 0, in.getParserMalformed());91 assertEquals(parseErrors, in.getParserMalformed()); 92 92 assertEquals(gpx.dataSources, in.data.dataSources); 93 93 assertEquals(1, gpx.tracks.size()); … … 129 129 @Test 130 130 void testTicket1433() throws Exception { 131 compareWithReference(1433, "2008-08-14-16-04-58", 1241); 131 compareWithReference(1433, "2008-08-14-16-04-58", 1241, 0); 132 132 } 133 133 134 134 /** 135 135 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/1853">Bug #1853</a>. 136 * date format is wrong, so RMC lines get ignored 136 137 * @throws Exception if an error occurs 137 138 */ 138 139 @Test 139 140 void testTicket1853() throws Exception { 140 compareWithReference(1853, "PosData-20081216-115434", 1285); 141 /* last argument must be 1285 if RMC_TIME_FMT is not using .withResolverStyle(ResolverStyle.LENIENT) */ 142 compareWithReference(1853, "PosData-20081216-115434", 1285, 0); 141 143 } 142 144 … … 147 149 @Test 148 150 void testTicket2147() throws Exception { 149 compareWithReference(2147, "WG20080203171807.log", 487); 151 compareWithReference(2147, "WG20080203171807.log", 487, 0); 150 152 } 151 153 … … 156 158 @Test 157 159 void testTicket14924() throws Exception { 158 compareWithReference(14924, "input", 0); 160 compareWithReference(14924, "input", 0, 0); 159 161 } 160 162
Note:
See TracChangeset
for help on using the changeset viewer.
