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:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-07-01 15:42:13 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:54:18 +0300
commit7eed4e572d09a5f5359603599dfc07d06632fbc6 (patch)
treec2c22f7a91d105cd36e3361facdea241c0c94d28 /integration_tests
parentc68603248c8fd43345bbff8048d5fd0d1641ef51 (diff)
Using of local file checking API
Diffstat (limited to 'integration_tests')
-rw-r--r--integration_tests/osrm_test_tools.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/integration_tests/osrm_test_tools.cpp b/integration_tests/osrm_test_tools.cpp
index 1fdc298b9e..49ee906cca 100644
--- a/integration_tests/osrm_test_tools.cpp
+++ b/integration_tests/osrm_test_tools.cpp
@@ -271,11 +271,16 @@ namespace integration
void TestOnlineFetcher(m2::PointD const & startPoint, m2::PointD const & finalPoint,
vector<string> const & expected, OsrmRouterComponents & routerComponents)
{
- search::Engine * searchEngine(routerComponents.GetSearchEngine());
- routing::OnlineAbsentFetcher fetcher([&searchEngine](m2::PointD const & pt)
- {
- return searchEngine->GetCountryFile(pt);
- });
+ auto countryFileGetter = [&routerComponents](m2::PointD const & p) -> string
+ {
+ return routerComponents.GetSearchEngine()->GetCountryFile(p);
+ };
+ auto localFileGetter = [&routerComponents](string const & countryFile) -> shared_ptr<LocalCountryFile>
+ {
+ //Always returns empty LocalFile
+ return shared_ptr<LocalCountryFile>(new LocalCountryFile());
+ };
+ routing::OnlineAbsentFetcher fetcher(countryFileGetter, localFileGetter);
fetcher.GenerateRequest(MercatorBounds::FromLatLon(startPoint.y, startPoint.x),
MercatorBounds::FromLatLon(finalPoint.y, finalPoint.x));
vector<string> absent;