Changeset 11486 in josm for trunk/test


Ignore:
Timestamp:
2017-01-22T19:14:12+01:00 (8 years ago)
Author:
Don-vip
Message:

fix #14275 - robustness against invalid timestamps in GPX files

Location:
trunk/test
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerActionTest.java

    r11094 r11486  
    33
    44import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertNotNull;
     6
     7import java.io.IOException;
    58
    69import org.junit.BeforeClass;
     
    1316import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    1417import org.openstreetmap.josm.io.GpxReaderTest;
     18import org.xml.sax.SAXException;
    1519
    1620/**
     
    4044                osm.getNodes().iterator().next().getKeys());
    4145    }
     46
     47    /**
     48     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/14275">#14275</a>
     49     * @throws IOException if an error occurs during reading
     50     * @throws SAXException if any XML error occurs
     51     */
     52    @Test
     53    public void testTicket14275() throws IOException, SAXException {
     54        assertNotNull(GpxReaderTest.parseGpxData(TestUtils.getRegressionDataFile(14275, "1485101437.8189685.gpx")));
     55    }
    4256}
  • trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java

    r11036 r11486  
    117117     */
    118118    @Test
    119     public void testFromDate() throws Exception {
     119    public void testFromDate() {
    120120        assertEquals("1970-01-01T00:00:00Z", DateUtils.fromDate(new Date(0)));
    121121        assertEquals("1970-01-01T00:00:00.1Z", DateUtils.fromDate(new Date(100)));
Note: See TracChangeset for help on using the changeset viewer.