Changeset 15136 in josm
- Timestamp:
- 2019-05-29T06:28:43+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnclosedWaysTest.java
r15134 r15136 15 15 import org.openstreetmap.josm.data.osm.Node; 16 16 import org.openstreetmap.josm.data.osm.OsmUtils; 17 import org.openstreetmap.josm.data.osm.Relation; 18 import org.openstreetmap.josm.data.osm.RelationMember; 17 19 import org.openstreetmap.josm.data.osm.Way; 18 20 import org.openstreetmap.josm.gui.mappaint.ElemStyles; … … 76 78 } 77 79 80 /** 81 * Test to make sure the multipolygon ways are ignored 82 * @throws Exception if an exception occurs 83 */ 84 @Test 85 public void testWayInMultiPolygon() throws Exception { 86 UnclosedWays uwTest = new UnclosedWays(); 87 uwTest.initialize(); 88 uwTest.startTest(null); 89 DataSet ds = new DataSet(); 90 91 // Erroneous tag 92 Way w = createUnclosedWay("natural=water", ds); 93 Relation r = (Relation) OsmUtils.createPrimitive("relation type=multipolygon natural=wood"); 94 r.addMember(new RelationMember("inner", w)); 95 ds.addPrimitive(r); 96 uwTest.visit(w); 97 assertTrue(ElemStyles.hasAreaElemStyle(w, false)); 98 assertEquals(0, uwTest.getErrors().size()); 99 100 uwTest.endTest(); 101 } 102 78 103 }
Note:
See TracChangeset
for help on using the changeset viewer.