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

Add Lane Count Tests #145

Merged
merged 1 commit into from
Apr 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't really thought about using skipped tests enough. Good examples in this PR.

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