Changeset 15704 in josm for trunk/test


Ignore:
Timestamp:
2020-01-13T23:28:16+01:00 (5 years ago)
Author:
GerdP
Message:

fix #9836: crossing barrier and highway is not reported (regressin of r6581)

  • detect crossings between barrier/building, barrier/highway, barrier/railway, and barrier/waterway
  • remove CrossingWays.Barrier class and add check barrier in standard test CrossingWays.Ways
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/CrossingWaysTest.java

    r14813 r15704  
    1717import org.openstreetmap.josm.data.osm.Way;
    1818import org.openstreetmap.josm.data.osm.WaySegment;
    19 import org.openstreetmap.josm.data.validation.tests.CrossingWays.Barrier;
    2019import org.openstreetmap.josm.data.validation.tests.CrossingWays.Boundaries;
    2120import org.openstreetmap.josm.data.validation.tests.CrossingWays.SelfCrossing;
     
    144143        testMessage(650, test, "waterway=river", "waterway=river");
    145144        testMessage(651, test, "waterway=river", "amenity=restaurant");
     145        testMessage(603, test, "barrier=hedge", "barrier=yes");
     146        testMessage(661, test, "barrier=hedge", "building=yes");
     147        testMessage(662, test, "barrier=hedge", "highway=road");
     148        testMessage(663, test, "barrier=hedge", "railway=rail");
     149        testMessage(664, test, "barrier=hedge", "waterway=river");
     150
     151        assertFalse(test.isPrimitiveUsable(newUsableWay("amenity=restaurant")));
     152        assertFalse(test.isPrimitiveUsable(TestUtils.newWay("barrier=yes"))); // Unusable (0 node)
     153        assertTrue(test.isPrimitiveUsable(newUsableWay("barrier=yes"))); // Usable (2 nodes)
     154
    146155    }
    147156
     
    161170
    162171    /**
    163      * Unit test of {@link CrossingWays.Barrier}
    164      */
    165     @Test
    166     public void testBarrier() {
    167         Barrier test = new CrossingWays.Barrier();
    168         // isPrimitiveUsable
    169         assertFalse(test.isPrimitiveUsable(newUsableWay("amenity=restaurant")));
    170         assertFalse(test.isPrimitiveUsable(TestUtils.newWay("barrier=yes"))); // Unusable (0 node)
    171         assertTrue(test.isPrimitiveUsable(newUsableWay("barrier=yes"))); // Usable (2 nodes)
    172     }
    173 
    174     /**
    175172     * Unit test of {@link CrossingWays.SelfCrossing}
    176173     */
Note: See TracChangeset for help on using the changeset viewer.