Changeset 17283 in josm for trunk/test


Ignore:
Timestamp:
2020-10-29T17:56:01+01:00 (4 years ago)
Author:
GerdP
Message:

fix #19438: DataIntegrityProblemException: Deleted node referenced during conflict solving

  • use Way.calculateRemoveNodes() if way is not incomplete
File:
1 edited

Legend:

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

    r17275 r17283  
    1212
    1313import org.junit.Assert;
     14import org.junit.jupiter.api.Test;
    1415import org.junit.jupiter.api.extension.RegisterExtension;
    15 import org.junit.jupiter.api.Test;
    1616import org.openstreetmap.josm.TestUtils;
    1717import org.openstreetmap.josm.data.Bounds;
     
    168168        Node n2 = new Node(2);
    169169        Node n3 = new Node(3);
     170        Node n4 = new Node(4);
    170171        Way w1 = new Way(1);
    171         w1.setNodes(Arrays.asList(n1, n2, n3, n1));
     172        w1.setNodes(Arrays.asList(n1, n2, n3, n4, n1));
     173        w1.setIncomplete(false);
     174        assertEquals(5, w1.getNodesCount());
     175        assertTrue(w1.isClosed());
    172176        ds.addPrimitive(n1);
    173177        ds.addPrimitive(n2);
    174178        ds.addPrimitive(n3);
     179        ds.addPrimitive(n4);
    175180        ds.addPrimitive(w1);
    176181        ds.unlinkNodeFromWays(n1);
    177         assertEquals(2, w1.getRealNodesCount());
     182        assertTrue(w1.isClosed());
     183        assertEquals(4, w1.getNodesCount());
    178184    }
    179185
Note: See TracChangeset for help on using the changeset viewer.