Changeset 17190 in josm for trunk/test/unit


Ignore:
Timestamp:
2020-10-13T21:03:27+02:00 (4 years ago)
Author:
GerdP
Message:

fix #19438: DataIntegrityProblemException: Deleted node referenced during conflict solving
Let Dataset.unlinkNodeFromWays() remove all links, not only the first one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetTest.java

    r16212 r17190  
    160160
    161161    /**
     162     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14186">Bug #14186</a>.
     163     */
     164    @Test
     165    public void testTicket19438() {
     166        final DataSet ds = new DataSet();
     167        Node n1 = new Node(1);
     168        Node n2 = new Node(2);
     169        Node n3 = new Node(3);
     170        Way w1 = new Way(1);
     171        w1.setNodes(Arrays.asList(n1, n2, n3, n1));
     172        ds.addPrimitive(n1);
     173        ds.addPrimitive(n2);
     174        ds.addPrimitive(n3);
     175        ds.addPrimitive(w1);
     176        ds.unlinkNodeFromWays(n1);
     177        assertEquals(2, w1.getRealNodesCount());
     178    }
     179
     180    /**
    162181     * Test the selection order.
    163182     * See <a href="https://josm.openstreetmap.de/ticket/14737">#14737</a>
Note: See TracChangeset for help on using the changeset viewer.