Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Shalnev <c.shalnev@corp.mail.ru>2015-07-13 18:11:57 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:55:55 +0300
commiteb088e3e7fd1b13c424584f2d84cd7eb5ca7d981 (patch)
tree305fc43a0269c39bca01b186b219fdca9af29910 /integration_tests
parent4f98f57347d059d28863edd7e39cbd2a1858a2b6 (diff)
Implemented crossmwm routing, fixed crash of routing on overlapped mwms.
Diffstat (limited to 'integration_tests')
-rw-r--r--integration_tests/pedestrian_route_test.cpp16
-rw-r--r--integration_tests/routing_test_tools.cpp13
2 files changed, 19 insertions, 10 deletions
diff --git a/integration_tests/pedestrian_route_test.cpp b/integration_tests/pedestrian_route_test.cpp
index 967ee10fea..f5b4a682a3 100644
--- a/integration_tests/pedestrian_route_test.cpp
+++ b/integration_tests/pedestrian_route_test.cpp
@@ -367,3 +367,19 @@ UNIT_TEST(USANewYorkEmpireStateBuildingToUnitedNations)
MercatorBounds::FromLatLon(40.74844, -73.98566), {0., 0.},
MercatorBounds::FromLatLon(40.75047, -73.96759), 2265.);
}
+
+UNIT_TEST(CrossMwmEgyptTabaToJordanAqaba)
+{
+ integration::CalculateRouteAndTestRouteLength(
+ integration::GetPedestrianComponents(),
+ MercatorBounds::FromLatLon(29.49271, 34.89571), {0., 0.},
+ MercatorBounds::FromLatLon(29.52774, 35.00324), 29016);
+}
+
+UNIT_TEST(CrossMwmRussiaPStaiToBelarusDrazdy)
+{
+ integration::CalculateRouteAndTestRouteLength(
+ integration::GetPedestrianComponents(),
+ MercatorBounds::FromLatLon(55.014, 30.95552), {0., 0.},
+ MercatorBounds::FromLatLon(55.01437, 30.8858), 4834.5);
+}
diff --git a/integration_tests/routing_test_tools.cpp b/integration_tests/routing_test_tools.cpp
index 292f5fe323..4d45a68d3f 100644
--- a/integration_tests/routing_test_tools.cpp
+++ b/integration_tests/routing_test_tools.cpp
@@ -96,16 +96,9 @@ namespace integration
return osrmRouter;
}
- shared_ptr<IRouter> CreatePedestrianRouter(Index & index, search::Engine & searchEngine)
+ shared_ptr<IRouter> CreatePedestrianRouter(Index & index)
{
- auto const countryFileFn = [&searchEngine](m2::PointD const & pt)
- {
- return searchEngine.GetCountryFile(pt);
- };
-
- unique_ptr<IRouter> router = CreatePedestrianAStarBidirectionalRouter(index,
- countryFileFn,
- nullptr);
+ unique_ptr<IRouter> router = CreatePedestrianAStarBidirectionalRouter(index, nullptr);
return shared_ptr<IRouter>(move(router));
}
@@ -141,7 +134,7 @@ namespace integration
PedestrianRouterComponents(vector<LocalCountryFile> const & localFiles)
: m_featuresFetcher(CreateFeaturesFetcher(localFiles)),
m_searchEngine(CreateSearchEngine(m_featuresFetcher)),
- m_router(CreatePedestrianRouter(m_featuresFetcher->GetIndex(), *m_searchEngine.get()))
+ m_router(CreatePedestrianRouter(m_featuresFetcher->GetIndex()))
{
}
IRouter * GetRouter() const override { return m_router.get(); }