Changeset 7357 in josm for trunk/test/unit/org/openstreetmap/josm/data
- Timestamp:
- 2014-08-01T21:05:34+02:00 (10 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/data/validation/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LanesTest.groovy
r7081 r7357 1 1 package org.openstreetmap.josm.data.validation.tests 2 2 3 import org.openstreetmap.josm. TestUtils3 import org.openstreetmap.josm.data.osm.OsmUtils 4 4 5 5 class LanesTest extends GroovyTestCase { … … 22 22 23 23 void test1() { 24 lanes.check( TestUtils.createPrimitive("way turn:lanes=left|right change:lanes=only_left|not_right|yes"))24 lanes.check(OsmUtils.createPrimitive("way turn:lanes=left|right change:lanes=only_left|not_right|yes")) 25 25 assert lanes.errors.get(0).getMessage() == "Number of lane dependent values inconsistent" 26 26 } 27 27 28 28 void test2() { 29 lanes.check( TestUtils.createPrimitive("way width:lanes:forward=1|2|3 psv:lanes:forward=no|designated"))29 lanes.check(OsmUtils.createPrimitive("way width:lanes:forward=1|2|3 psv:lanes:forward=no|designated")) 30 30 assert lanes.errors.get(0).getMessage() == "Number of lane dependent values inconsistent in forward direction" 31 31 } 32 32 33 33 void test3() { 34 lanes.check( TestUtils.createPrimitive("way change:lanes:forward=yes|no turn:lanes:backward=left|right|left"))34 lanes.check(OsmUtils.createPrimitive("way change:lanes:forward=yes|no turn:lanes:backward=left|right|left")) 35 35 assert lanes.errors.isEmpty() 36 36 } 37 37 38 38 void test4() { 39 lanes.check( TestUtils.createPrimitive("way turn:lanes:forward=left|right change:lanes:forward=yes|no|yes width:backward=1|2|3"))39 lanes.check(OsmUtils.createPrimitive("way turn:lanes:forward=left|right change:lanes:forward=yes|no|yes width:backward=1|2|3")) 40 40 assert lanes.errors.get(0).getMessage() == "Number of lane dependent values inconsistent in forward direction" 41 41 } 42 42 43 43 void test5() { 44 lanes.check( TestUtils.createPrimitive("way lanes:forward=5 turn:lanes:forward=left|right"))44 lanes.check(OsmUtils.createPrimitive("way lanes:forward=5 turn:lanes:forward=left|right")) 45 45 assert lanes.errors.get(0).getMessage() == "Number of lanes:forward greater than *:lanes:forward" 46 46 } 47 47 48 48 void test6() { 49 lanes.check( TestUtils.createPrimitive("way lanes:forward=foo|bar turn:lanes:forward=foo+bar"))49 lanes.check(OsmUtils.createPrimitive("way lanes:forward=foo|bar turn:lanes:forward=foo+bar")) 50 50 assert lanes.errors.isEmpty() 51 51 } 52 52 53 53 void test7() { 54 lanes.check( TestUtils.createPrimitive("way lanes=3 lanes:forward=3 lanes:backward=7"))54 lanes.check(OsmUtils.createPrimitive("way lanes=3 lanes:forward=3 lanes:backward=7")) 55 55 assert lanes.errors.get(0).getMessage() == "Number of lanes:forward+lanes:backward greater than lanes" 56 56 } 57 57 58 58 void test8() { 59 lanes.check( TestUtils.createPrimitive("way destination:country:lanes=X|Y;Z|none destination:ref:lanes=xyz|| destination:sign:lanes=none|airport|none"))59 lanes.check(OsmUtils.createPrimitive("way destination:country:lanes=X|Y;Z|none destination:ref:lanes=xyz|| destination:sign:lanes=none|airport|none")) 60 60 assert lanes.errors.isEmpty() 61 61 } -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/RelationCheckerTest.groovy
r7254 r7357 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.validation.tests 3 4 import static org.openstreetmap.josm.data.osm.OsmUtils.createPrimitive 3 5 4 6 import org.openstreetmap.josm.JOSMFixture … … 8 10 import org.openstreetmap.josm.data.validation.TestError 9 11 import org.openstreetmap.josm.gui.tagging.TaggingPresets 10 11 import static org.openstreetmap.josm.TestUtils.createPrimitive12 12 13 13 class RelationCheckerTest extends GroovyTestCase {
Note:
See TracChangeset
for help on using the changeset viewer.