Ignore:
Timestamp:
2019-01-16T09:13:03+01:00 (6 years ago)
Author:
gerdp
Message:

fix #14545 - Open edited pbf file fails (negative IDs)

  • use AbstractReader.buildPrimitive()
  • add unit test
Location:
applications/editors/josm/plugins/pbf/test
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pbf/test/unit/org/openstreetmap/josm/plugins/pbf/io/PbfImporterTest.java

    r32861 r34826  
    8080        assertEquals(97, ds.getRelations().size());
    8181    }
     82   
     83    /**
     84     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14545">Ticket #14545</a>.
     85     * @throws Exception if an error occurs
     86     */
     87    @Test
     88    public void testTicket14545() throws Exception {
     89        DataSet ds = new PbfImporter().parseDataSet(TestUtils.getRegressionDataFile(14545, "reg14545.osm.pbf"));
     90        assertNotNull(ds);
     91        assertEquals(12, ds.getNodes().size());
     92        assertEquals(2, ds.getWays().size());
     93        assertEquals(1, ds.getRelations().size());
     94    }
     95
     96   
    8297}
Note: See TracChangeset for help on using the changeset viewer.