From c7ee402b0e96c0fab2f97ba798871a275b0e9229 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 13 Oct 2014 14:56:17 +0200 Subject: [PATCH] make link tests less brittle, no overlapping paths --- features/car/link.feature | 149 ++++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 78 deletions(-) diff --git a/features/car/link.feature b/features/car/link.feature index 141249a0f..f4628e4ce 100644 --- a/features/car/link.feature +++ b/features/car/link.feature @@ -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 |