Ignore:
Timestamp:
2026-02-20T22:21:27+01:00 (22 hours ago)
Author:
stoecker
Message:

see #24635 - remove usage of Date

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java

    r19321 r19539  
    8484    }
    8585   
    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 {
    8787        GpxData gpx = GpxReaderTest.parseGpxData(TestUtils.getRegressionDataFile(ticket, filename+".gpx"));
    8888        NmeaReader in = new NmeaReader(Files.newInputStream(Paths.get(TestUtils.getRegressionDataFile(ticket, filename+".nmea"))));
    8989        in.parse(true);
    9090        assertEquals(numCoor, in.getNumberOfCoordinates());
    91         assertEquals(0, in.getParserMalformed());
     91        assertEquals(parseErrors, in.getParserMalformed());
    9292        assertEquals(gpx.dataSources, in.data.dataSources);
    9393        assertEquals(1, gpx.tracks.size());
     
    129129    @Test
    130130    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);
    132132    }
    133133
    134134    /**
    135135     * 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
    136137     * @throws Exception if an error occurs
    137138     */
    138139    @Test
    139140    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);
    141143    }
    142144
     
    147149    @Test
    148150    void testTicket2147() throws Exception {
    149         compareWithReference(2147, "WG20080203171807.log", 487);
     151        compareWithReference(2147, "WG20080203171807.log", 487, 0);
    150152    }
    151153
     
    156158    @Test
    157159    void testTicket14924() throws Exception {
    158         compareWithReference(14924, "input", 0);
     160        compareWithReference(14924, "input", 0, 0);
    159161    }
    160162
Note: See TracChangeset for help on using the changeset viewer.