Changeset 197 in josm for test


Ignore:
Timestamp:
2007-01-14T05:00:46+01:00 (18 years ago)
Author:
imi
Message:
  • fixed a bug in merging code (hopefully the same that causes the exception in conflict dialog)
File:
1 edited

Legend:

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

    r187 r197  
    11package org.openstreetmap.josm.data.osm.visitor;
    22
     3import java.util.Arrays;
    34import java.util.Date;
    45
     
    4142    }
    4243
     44        private Way createWay(long id, Date timestamp, Segment... segments) {
     45                Way w = new Way();
     46                w.id = id;
     47                w.segments.addAll(Arrays.asList(segments));
     48                w.timestamp = timestamp;
     49                return w;
     50        }
    4351
    4452        /**
     
    307315        }
    308316       
     317        public void testMergeIncompleteSegmentsAddToDataSet() throws Exception {
     318                DataSet ds = new DataSet();
     319                MergeVisitor v = new MergeVisitor(ds);
     320                v.visit(createSegment(null, true, false, 1));
     321                assertEquals(1, ds.segments.size());
     322    }
     323       
    309324}
Note: See TracChangeset for help on using the changeset viewer.