Changeset 9979 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2016-03-13T01:17:21+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
r9961 r9979 1034 1034 } 1035 1035 1036 1037 /** 1038 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12616">Bug #12616</a>. 1039 */ 1040 @Test 1041 public void testTicket12616() { 1042 // Server node: no modifications 1043 Node n1 = new Node(1, 1); 1044 n1.setCoor(LatLon.ZERO); 1045 assertFalse(n1.isModified()); 1046 their.addPrimitive(n1); 1047 1048 // Local node: one modification: move 1049 Node n1b = new Node(n1); 1050 n1b.setCoor(new LatLon(1, 1)); 1051 n1b.setModified(true); 1052 assertTrue(n1b.isModified()); 1053 assertEquals(new LatLon(1, 1), n1b.getCoor()); 1054 my.addPrimitive(n1b); 1055 1056 // Merge 1057 DataSetMerger visitor = new DataSetMerger(my, their); 1058 visitor.merge(); 1059 1060 // Check that modification is still here 1061 Node n = (Node) my.getPrimitiveById(1, OsmPrimitiveType.NODE); 1062 assertNotNull(n); 1063 assertEquals(new LatLon(1, 1), n.getCoor()); 1064 assertTrue(n.isModified()); 1065 1066 // Merge again 1067 visitor = new DataSetMerger(my, their); 1068 visitor.merge(); 1069 1070 // Check that modification is still here 1071 n = (Node) my.getPrimitiveById(1, OsmPrimitiveType.NODE); 1072 assertNotNull(n); 1073 assertEquals(new LatLon(1, 1), n.getCoor()); 1074 assertTrue(n.isModified()); 1075 } 1036 1076 }
Note:
See TracChangeset
for help on using the changeset viewer.