diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-06-06 17:57:48 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-06-17 19:36:51 +0300 |
commit | f61de40e04d2a75d85c98a5b8743b3c0e0a6d308 (patch) | |
tree | 528a32c5210b0530f7e3ab65c0212c04d5f3f7e6 /routing | |
parent | afea24bc7f403e40cea7f3f067b6cced9dbfd7f9 (diff) |
[bicycle routing] Tests on using bicycle=yes or no and oneway:bicycle for bicycle routing.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/routing_integration_tests/bicycle_route_test.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/routing/routing_integration_tests/bicycle_route_test.cpp b/routing/routing_integration_tests/bicycle_route_test.cpp index a6b82fe039..2929dfa1b7 100644 --- a/routing/routing_integration_tests/bicycle_route_test.cpp +++ b/routing/routing_integration_tests/bicycle_route_test.cpp @@ -34,3 +34,32 @@ UNIT_TEST(SwedenStockholmCyclewayPriority) integration::GetBicycleComponents(), MercatorBounds::FromLatLon(59.33151, 18.09347), {0., 0.}, MercatorBounds::FromLatLon(59.33052, 18.09391), 113.0); } + +UNIT_TEST(NetherlandsAmsterdamBicycleNo) +{ + TRouteResult const routeResult = integration::CalculateRoute( + integration::GetBicycleComponents(), MercatorBounds::FromLatLon(52.32716, 5.05932), + {0.0, 0.0}, MercatorBounds::FromLatLon(52.32587, 5.06121)); + + IRouter::ResultCode const result = routeResult.second; + TEST_EQUAL(result, IRouter::RouteNotFound, ()); +} + +UNIT_TEST(NetherlandsAmsterdamBicycleYes) +{ + TRouteResult const routeResult = integration::CalculateRoute( + integration::GetBicycleComponents(), MercatorBounds::FromLatLon(52.32872, 5.07527), + {0.0, 0.0}, MercatorBounds::FromLatLon(52.33853, 5.08941)); + + Route const & route = *routeResult.first; + IRouter::ResultCode const result = routeResult.second; + TEST_EQUAL(result, IRouter::NoError, ()); + TEST_EQUAL(route.GetTotalTimeSec(), 356, ()); +} + +UNIT_TEST(NetherlandsAmsterdamSingelStOnewayBicycleNo) +{ + integration::CalculateRouteAndTestRouteLength( + integration::GetBicycleComponents(), MercatorBounds::FromLatLon(52.3785, 4.89407), {0., 0.}, + MercatorBounds::FromLatLon(52.37462, 4.88983), 519.0); +} |