Changeset 17430 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
r17400 r17430 119 119 if (isBuilding(w1) && isBuilding(w2)) 120 120 return true; // handled by mapcss tests 121 if (((isResidentialArea(w1) || w1.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY)) && isResidentialArea(w2)) 122 || ((isResidentialArea(w2) || w2.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY)) && isResidentialArea(w1))) 121 if (((isResidentialArea(w1) || w1.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY) || isWaterArea(w1)) 122 && isResidentialArea(w2)) 123 || ((isResidentialArea(w2) || w2.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY) || isWaterArea(w2)) 124 && isResidentialArea(w1))) 123 125 return true; 124 126 if (isWaterArea(w1) && isWaterArea(w2)) -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/CrossingWaysTest.java
r17400 r17430 47 47 private static void testMessage(int code, CrossingWays test, String tags1, String tags2) { 48 48 assertEquals(code, test.createMessage(TestUtils.newWay(tags1), TestUtils.newWay(tags2)).code); 49 } 50 51 private static void testIgnore(boolean expected, CrossingWays test, String tags1, String tags2) { 52 // test both possible combinations 53 assertEquals(expected, test.ignoreWaySegmentCombination(TestUtils.newWay(tags1), TestUtils.newWay(tags2))); 54 assertEquals(expected, test.ignoreWaySegmentCombination(TestUtils.newWay(tags2), TestUtils.newWay(tags1))); 49 55 } 50 56 … … 156 162 testMessage(665, test, "barrier=hedge", "natural=water"); 157 163 164 testIgnore(true, test, "landuse=residential", "natural=water"); 165 testIgnore(false, test, "landuse=residential", "building=yes"); 166 158 167 assertFalse(test.isPrimitiveUsable(newUsableWay("amenity=restaurant"))); 159 168 assertFalse(test.isPrimitiveUsable(TestUtils.newWay("barrier=yes"))); // Unusable (0 node)
Note:
See TracChangeset
for help on using the changeset viewer.