Changeset 8941 in josm for trunk/test


Ignore:
Timestamp:
2015-10-24T21:32:35+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #12004 - suggest to replace source:maxspeed=UK:* by source:maxspeed=GB:* as per ISO 3166-2

Location:
trunk/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/config/unit-josm.home

    • Property svn:ignore
      •  

        old new  
        77elevation
        88preferences.xml.bak
         9plugins
         10ebdirigo
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/HighwaysTest.groovy

    r7938 r8941  
    55import org.openstreetmap.josm.data.coor.LatLon
    66import org.openstreetmap.josm.data.osm.DataSet
     7import org.openstreetmap.josm.data.osm.Node
    78import org.openstreetmap.josm.data.osm.Way
    89
     
    1718        def ds = new DataSet()
    1819
    19         def n00 = new org.openstreetmap.josm.data.osm.Node(new LatLon(0, 0))
    20         def n10 = new org.openstreetmap.josm.data.osm.Node(new LatLon(1, 0))
    21         def n20 = new org.openstreetmap.josm.data.osm.Node(new LatLon(2, 0))
    22         def n01 = new org.openstreetmap.josm.data.osm.Node(new LatLon(0, 1))
    23         def n11 = new org.openstreetmap.josm.data.osm.Node(new LatLon(1, 1))
    24         def n21 = new org.openstreetmap.josm.data.osm.Node(new LatLon(2, 1))
     20        def n00 = new Node(new LatLon(0, 0))
     21        def n10 = new Node(new LatLon(1, 0))
     22        def n20 = new Node(new LatLon(2, 0))
     23        def n01 = new Node(new LatLon(0, 1))
     24        def n11 = new Node(new LatLon(1, 1))
     25        def n21 = new Node(new LatLon(2, 1))
    2526
    2627        ds.addPrimitive(n00)
     
    6162        assert Highways.isHighwayLinkOkay(createTestSetting("residential", "residential"))
    6263    }
     64
     65    void testSourceMaxSpeedUnitedKingdom() {
     66        def link = createTestSetting("primary", "primary")
     67        link.put("maxspeed", "60 mph")
     68        link.put("source:maxspeed", "UK:nsl_single")
     69        def test = new Highways()
     70        test.visit(link)
     71        assert test.errors.size() == 1
     72        def error = test.errors.get(0)
     73        assert error.isFixable()
     74        assert error.getFix().executeCommand()
     75        assert "GB:nsl_single".equals(link.get("source:maxspeed"))
     76    }
    6377}
Note: See TracChangeset for help on using the changeset viewer.