Changeset 12137 in josm for trunk


Ignore:
Timestamp:
2017-05-13T14:47:52+02:00 (7 years ago)
Author:
Don-vip
Message:

see #14788 - add non-regression test

Location:
trunk/test
Files:
2 added
1 edited

Legend:

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

    r12087 r12137  
    4848        }
    4949    }
     50
     51    /**
     52     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14788">Bug #14788</a>.
     53     * @throws Exception if any error occurs
     54     */
     55    @Test
     56    public void testTicket14788() throws Exception {
     57        try (InputStream in = TestUtils.getRegressionDataStream(14788, "remove_sign_test_4.osm")) {
     58            OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE);
     59            fail("should throw exception");
     60        } catch (IllegalDataException e) {
     61            assertEquals("Illegal value for attributes 'lat', 'lon' on node with ID 978." +
     62                    " Got 'nan', 'nan'." +
     63                    " (at line 4, column 151). 336 bytes have been read", e.getMessage());
     64        }
     65    }
    5066}
Note: See TracChangeset for help on using the changeset viewer.