Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #145 from droogmic/lane_count_test
Browse files Browse the repository at this point in the history
Add Lane Count Tests
  • Loading branch information
droogmic authored Apr 25, 2022
2 parents e741e41 + 049fb04 commit 842f5ea
Showing 1 changed file with 108 additions and 46 deletions.
154 changes: 108 additions & 46 deletions data/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,10 @@
direction: forward
designated: motor_vehicle

- description: bus:lanes:forward=designated|
- description: "bus:lanes:forward=designated|"
skip_python: true
skip_kotlin: true
rust: false # see next test
tags:
highway: "road"
lanes: "3"
Expand All @@ -864,6 +865,30 @@
direction: forward
designated: motor_vehicle

- description: "bus:lanes:forward=designated| with lane hint"
skip_python: true
skip_kotlin: true
tags:
highway: "road"
sidewalk: "no"
shoulder: "no"
lanes: "3"
lanes:forward: "2"
bus:lanes:forward: "designated|"
driving_side: right
road:
highway: road
lanes:
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
direction: forward
designated: bus
- type: travel
direction: forward
designated: motor_vehicle

- description: bus:lanes:backward=designated
skip_python: true
skip_kotlin: true
Expand Down Expand Up @@ -1157,69 +1182,106 @@
direction: forward
designated: motor_vehicle

- way_id: 898731283
comment: how should an odd number of lanes forward/backwards be split without any clues?
- description: "3 lanes"
way_id: 898731283
comment: "guess that an odd number of lanes will be divided favouring the forward direction with a warning"
tags:
highway: "road"
lanes: "3"
sidewalk: "both"
driving_side: "left"
output:
- type: travel
designated: foot
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
designated: foot
road:
highway: road
lanes:
- type: travel
designated: foot
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
designated: foot

# I didn't look for a real example of this
- description: "5 lanes"
comment: "guess that an odd number of lanes will be divided favouring the forward direction with a warning"
tags:
highway: "road"
lanes: "5"
sidewalk: "no"
driving_side: right
output:
- type: shoulder
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: shoulder
road:
highway: road
lanes:
- type: shoulder
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: shoulder

- way_id: 335668924
- description: "lanes, lanes:backward"
comment: "assume lanes:forward to be lanes - lanes:backward"
rust: false
skip_python: true
skip_kotlin: true
tags:
highway: "road"
lanes: "1"
lanes: "4"
lanes:backward: "1"
sidewalk: "no"
driving_side: right
output:
- type: shoulder
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: shoulder
road:
highway: road
lanes:
- type: shoulder
- type: travel
direction: backward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: travel
direction: forward
designated: motor_vehicle
- type: shoulder

- description: "a narrow alleyway tagged lanes=1"
way_id: 335668924
rust: false
skip_python: true
skip_kotlin: true
tags:
highway: "service"
lanes: "1"
driving_side: right
road:
highway: service
lanes:
- type: shoulder
- type: travel
direction: both
designated: motor_vehicle
- type: shoulder

- way_id: 13859146
rust: false
Expand Down

0 comments on commit 842f5ea

Please sign in to comment.