Changeset 8700 in josm for trunk/data/validator


Ignore:
Timestamp:
2015-08-28T22:25:40+02:00 (4 years ago)
Author:
Klumbumbus
Message:

fix #11389 - Add validator tests for combinations of maxspeed, maxspeed:forward and maxspeed:backward; enhance numerical test to forward and backward versions and remove "*=unknown" from whitelist of this numerical test

Location:
trunk/data/validator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/combinations.mapcss

    r8617 r8700  
    285285  suggestAlternative: "destination:backward";
    286286}
     287
     288/* see #11389 */
     289way["maxspeed:forward"=*"maxspeed:backward"][!maxspeed] {
     290  throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
     291  suggestAlternative: "maxspeed";
     292  fixChangeKey: "maxspeed:forward=>maxspeed";
     293  fixRemove: "maxspeed:backward";
     294}
     295way["maxspeed:forward"=*maxspeed]["maxspeed:backward"=*maxspeed][maxspeed] {
     296  throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
     297  set AllSameMaxspeed;
     298  suggestAlternative: "maxspeed";
     299  fixRemove: "maxspeed:forward";
     300  fixRemove: "maxspeed:backward";
     301}
     302way["maxspeed:forward"]["maxspeed:backward"][maxspeed]!.AllSameMaxspeed {
     303  throwWarning: tr("{0} and {1} together with {2} and conflicting values", "{0.key}", "{1.key}", "{2.key}");
     304}
     305way["maxspeed:forward"][maxspeed][!"maxspeed:backward"],
     306way["maxspeed:backward"][maxspeed][!"maxspeed:forward"] {
     307  throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
     308}
  • trunk/data/validator/numeric.mapcss

    r7998 r8700  
    8181  assertNoMatch: "way maxwidth=7 ft";
    8282}
    83 
    84 way[maxspeed][maxspeed !~ /^(signals|none|unposted|unknown|variable|walk|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway))$/] {
     83way[maxspeed][maxspeed !~ /^(signals|none|unposted|variable|walk|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway))$/],
     84way[maxspeed:forward][maxspeed:forward !~ /^(signals|none|unposted|variable|walk|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway))$/],
     85way[maxspeed:backward][maxspeed:backward !~ /^(signals|none|unposted|variable|walk|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway))$/] {
    8586  throwWarning: tr("unusual {0} format", "maxspeed");
    8687  assertMatch: "way maxspeed=something";
Note: See TracChangeset for help on using the changeset viewer.