make link tests less brittle, no overlapping paths

This commit is contained in:
Dennis Luxen 2014-10-13 14:56:17 +02:00
parent 1c19796e3e
commit c7ee402b0e

View File

@ -1,6 +1,6 @@
@routing @link @car
Feature: Car - Speed on links
# Check that there's a reasonable ratio between the
# Check that there's a reasonable ratio between the
# speed of a way and it's corresponding link type.
Background: Use specific speeds
@ -9,110 +9,103 @@ Feature: Car - Speed on links
Scenario: Car - Use motorway_link when reasonable
Given the node map
| | | | | k | l | |
| | e | f | | | | |
| | | | | | | |
| a | g | h | b | m | n | c |
| | i | j | | o | p | |
| | | e | | | | f | | |
| x | a | b | | | | c | d | y |
And the ways
| nodes | highway |
| ag | motorway |
| hcm | motorway |
| nb | motorway |
| gefh | motorway |
| mkln | motorway |
| gijh | motorway_link |
| mopn | motorway_link |
| nodes | highway |
| xa | unclassified |
| ab | motorway_link |
| bc | motorway_link |
| cd | motorway_link |
| ae | motorway |
| ef | motorway |
| fd | motorway |
| dy | unclassified |
When I route I should get
| from | to | route |
| a | b | ag,gefh,hcm,mopn,nb |
| from | to | route |
| x | y | xa,ae,ef,fd,dy |
| b | c | bc |
Scenario: Car - Use trunk_link when reasonable
Given the node map
| | | | | k | l | |
| | e | f | | | | |
| | | | | | | |
| a | g | h | b | m | n | c |
| | i | j | | o | p | |
| | | e | | | | f | | |
| x | a | b | | | | c | d | y |
And the ways
| nodes | highway |
| ag | trunk |
| hcm | trunk |
| nb | trunk |
| gefh | trunk |
| mkln | trunk |
| gijh | trunk_link |
| mopn | trunk_link |
| nodes | highway |
| xa | unclassified |
| ab | trunk_link |
| bc | trunk_link |
| cd | trunk_link |
| ae | trunk |
| ef | trunk |
| fd | trunk |
| dy | unclassified |
When I route I should get
| from | to | route |
| a | b | ag,gefh,hcm,mopn,nb |
| from | to | route |
| x | y | xa,ae,ef,fd,dy |
| b | c | bc |
Scenario: Car - Use primary_link when reasonable
Given the node map
| | | | | k | l | |
| | e | f | | | | |
| | | | | | | |
| a | g | h | b | m | n | c |
| | i | j | | o | p | |
| | | e | | | | f | | |
| x | a | b | | | | c | d | y |
And the ways
| nodes | highway |
| ag | primary |
| hcm | primary |
| nb | primary |
| gefh | primary |
| mkln | primary |
| gijh | primary_link |
| mopn | primary_link |
| nodes | highway |
| xa | unclassified |
| ab | primary_link |
| bc | primary_link |
| cd | primary_link |
| ae | primary |
| ef | primary |
| fd | primary |
| dy | unclassified |
When I route I should get
| from | to | route |
| a | b | ag,gefh,hcm,mopn,nb |
| from | to | route |
| x | y | xa,ae,ef,fd,dy |
| b | c | bc |
Scenario: Car - Use secondary_link when reasonable
Given the node map
| | | | | k | l | |
| | e | f | | | | |
| | | | | | | |
| a | g | h | b | m | n | c |
| | i | j | | o | p | |
| | | e | | | | f | | |
| x | a | b | | | | c | d | y |
And the ways
| nodes | highway |
| ag | secondary |
| hcm | secondary |
| nb | secondary |
| gefh | secondary |
| mkln | secondary |
| gijh | secondary_link |
| mopn | secondary_link |
| nodes | highway |
| xa | unclassified |
| ab | secondary_link |
| bc | secondary_link |
| cd | secondary_link |
| ae | secondary |
| ef | secondary |
| fd | secondary |
| dy | unclassified |
When I route I should get
| from | to | route |
| a | b | ag,gefh,hcm,mopn,nb |
| from | to | route |
| x | y | xa,ae,ef,fd,dy |
| b | c | bc |
Scenario: Car - Use tertiary_link when reasonable
Given the node map
| | | | | k | l | |
| | e | f | | | | |
| | | | | | | |
| a | g | h | b | m | n | c |
| | i | j | | o | p | |
| | | e | | | | f | | |
| x | a | b | | | | c | d | y |
And the ways
| nodes | highway |
| ag | tertiary |
| hcm | tertiary |
| nb | tertiary |
| gefh | tertiary |
| mkln | tertiary |
| gijh | tertiary_link |
| mopn | tertiary_link |
| nodes | highway |
| xa | unclassified |
| ab | tertiary_link |
| bc | tertiary_link |
| cd | tertiary_link |
| ae | tertiary |
| ef | tertiary |
| fd | tertiary |
| dy | unclassified |
When I route I should get
| from | to | route |
| a | b | ag,gefh,hcm,mopn,nb |
| from | to | route |
| x | y | xa,ae,ef,fd,dy |
| b | c | bc |