Changeset 226 in josm for test


Ignore:
Timestamp:
2007-05-06T16:28:53+02:00 (14 years ago)
Author:
imi
Message:
  • fixed MergeVisitor to not merge two segments with different id's
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/org/openstreetmap/josm/data/osm/visitor/MergeVisitorTest.java

    r224 r226  
    350350                assertEquals(23, ds.segments.iterator().next().id);
    351351        }
     352       
     353        public void testDoNotMergeEqualObjectsWithDifferentNonZeroId() throws Exception {
     354                DataSet ds = new DataSet();
     355                Segment s1 = createSegment(ds, false, false, 23);
     356                Segment s2 = new Segment(s1);
     357                s2.id = 42;
     358                MergeVisitor v = new MergeVisitor(ds);
     359                v.visit(s2);
     360                assertEquals(2, ds.segments.size());
     361        }
    352362}
Note: See TracChangeset for help on using the changeset viewer.