Changeset 9961 in josm for trunk/test
- Timestamp:
- 2016-03-11T14:13:23+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
r9214 r9961 993 993 assertEquals(2, w.getNode(1).getId()); 994 994 } 995 996 /** 997 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12599">Bug #12599</a>. 998 */ 999 @Test 1000 public void testTicket12599() { 1001 // Server node: no modifications 1002 Node n1 = new Node(1, 1); 1003 n1.setCoor(LatLon.ZERO); 1004 assertFalse(n1.isModified()); 1005 their.addPrimitive(n1); 1006 1007 // Local node: one modification: addition of an uninteresting tag 1008 Node n1b = new Node(n1); 1009 n1b.setModified(true); 1010 n1b.put("note", "something"); 1011 assertTrue(n1b.isModified()); 1012 assertEquals(0, n1b.getInterestingTags().size()); 1013 my.addPrimitive(n1b); 1014 1015 // Merge 1016 DataSetMerger visitor = new DataSetMerger(my, their); 1017 visitor.merge(); 1018 1019 // Check that modification is still here 1020 Node n = (Node) my.getPrimitiveById(1, OsmPrimitiveType.NODE); 1021 assertNotNull(n); 1022 assertEquals("something", n.get("note")); 1023 assertTrue(n.isModified()); 1024 1025 // Merge again 1026 visitor = new DataSetMerger(my, their); 1027 visitor.merge(); 1028 1029 // Check that modification is still here 1030 n = (Node) my.getPrimitiveById(1, OsmPrimitiveType.NODE); 1031 assertNotNull(n); 1032 assertEquals("something", n.get("note")); 1033 assertTrue(n.isModified()); 1034 } 1035 995 1036 }
Note:
See TracChangeset
for help on using the changeset viewer.