Added traffic tests to MLD testing

This commit is contained in:
Michael Krasnyk
2017-03-14 15:39:59 +01:00
parent 20c6b4682f
commit c39690195e
7 changed files with 22 additions and 7 deletions
+2
View File
@@ -139,6 +139,7 @@ Feature: Basic Map Matching
"""
And the contract extra arguments "--segment-speed-file {speeds_file}"
And the customize extra arguments "--segment-speed-file {speeds_file}"
When I match I should get
| trace | matchings | a:duration |
@@ -165,6 +166,7 @@ Feature: Basic Map Matching
"""
And the contract extra arguments "--segment-speed-file {speeds_file}"
And the customize extra arguments "--segment-speed-file {speeds_file}"
When I match I should get
| trace | matchings | a:duration |
+8 -4
View File
@@ -27,7 +27,8 @@ Feature: Traffic - speeds
Scenario: Weighting based on speed file
Given the contract extra arguments "--segment-speed-file {speeds_file}"
Given the speed file
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the speed file
"""
1,2,0
2,1,0
@@ -52,7 +53,8 @@ Feature: Traffic - speeds
Scenario: Weighting based on speed file weights, ETA based on file durations
Given the contract extra arguments "--segment-speed-file {speeds_file}"
Given the speed file
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the speed file
"""
1,2,1,20020.7
2,1,1,20020.7
@@ -84,7 +86,8 @@ Feature: Traffic - speeds
properties.weight_precision = 3
"""
And the contract extra arguments "--segment-speed-file {speeds_file}"
Given the speed file
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the speed file
"""
1,2,1,20020.789
2,1,1,20020.123
@@ -110,10 +113,11 @@ Feature: Traffic - speeds
Scenario: Speeds that isolate a single node (a)
Given the contract extra arguments "--segment-speed-file {speeds_file}"
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the node locations
| node | lat | lon |
| h | 2.075 | 19.1 |
Given the speed file
And the speed file
"""
1,2,0
2,1,0
@@ -40,6 +40,8 @@ Feature: Traffic - turn penalties applied to turn onto which a phantom node snap
3,4,7,-30
"""
And the contract extra arguments "--turn-penalty-file {penalties_file}"
And the customize extra arguments "--turn-penalty-file {penalties_file}"
When I route I should get
| from | to | route | speed | time |
| a | e | ab,be,be | 36 km/h | 40s +-1 |
@@ -56,6 +58,8 @@ Feature: Traffic - turn penalties applied to turn onto which a phantom node snap
3,4,7,-30,100.75
"""
And the contract extra arguments "--turn-penalty-file {penalties_file}"
And the customize extra arguments "--turn-penalty-file {penalties_file}"
When I route I should get
| from | to | route | speed | time | weights |
| a | e | ab,be,be | 36 km/h | 40s +-1 | 16.7,20,0 |
+2
View File
@@ -280,6 +280,7 @@ Feature: Weight tests
2,3,5,25.5,16.7
"""
And the contract extra arguments "--segment-speed-file {speeds_file} --turn-penalty-file {penalties_file}"
And the customize extra arguments "--segment-speed-file {speeds_file} --turn-penalty-file {penalties_file}"
When I route I should get
| waypoints | route | distance | weights | times |
@@ -315,6 +316,7 @@ Feature: Weight tests
2,3,5,1
"""
And the contract extra arguments "--segment-speed-file {speeds_file} --turn-penalty-file {penalties_file}"
And the customize extra arguments "--segment-speed-file {speeds_file} --turn-penalty-file {penalties_file}"
When I route I should get
| waypoints | route | distance | weights | times |