Skip to content

Commit

Permalink
Add test fo excluding ferries on bikes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarex committed Apr 24, 2018
1 parent e15b436 commit 757dd62
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions features/bicycle/exclude.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@routing @bicycle @exclude
Feature: Bicycle - Exclude flags
Background:
Given the profile file "bicycle" initialized with
"""
profile.excludable = Sequence { Set { 'ferry' } }
"""
Given the node map
"""
a....b~~~~~c...f
: :
d.....e
"""

And the ways
| nodes | highway | route | duration | # |
| ab | service | | | always drivable |
| bc | | ferry | 00:00:01 | not drivable for exclude=ferry, but fast. |
| bd | service | | | always drivable |
| de | service | | | always drivable |
| ec | service | | | always drivable |
| cf | service | | | always drivable |

Scenario: Bicycle - exclude nothing
When I route I should get
| from | to | route |
| a | f | ab,bc,cf,cf |

When I match I should get
| trace | matchings | duration |
| abcf | abcf | 109 |

When I request a travel time matrix I should get
| | a | f |
| a | 0 | 109 |
| f | 109 | 0 |

Scenario: Bicycle - exclude ferry
Given the query options
| exclude | ferry |

When I route I should get
| from | to | route |
| a | f | ab,bd,de,ec,cf,cf |

When I match I should get
| trace | matchings | duration |
| abcf | abcf | 301.2 |

When I request a travel time matrix I should get
| | a | f |
| a | 0 | 301 +- 1 |
| f | 301.2 +- 1 | 0 |


0 comments on commit 757dd62

Please sign in to comment.