forked from organicmaps/organicmaps
Rebasing on master and solving conflicts.
This commit is contained in:
parent
b0090c9b83
commit
28dccd645c
3 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@ namespace
|
|||
{
|
||||
UNIT_TEST(OnlineRussiaNorthToSouthTest)
|
||||
{
|
||||
shared_ptr<integration::OsrmRouterComponents> routerComponents = integration::GetAllMaps();
|
||||
integration::OsrmRouterComponents & routerComponents = integration::GetAllMaps();
|
||||
TestOnlineCrosses({34.45, 61.76}, {38.94, 45.07},
|
||||
{"Russia_Central", "Russia_Southern", "Russia_Northwestern"}, routerComponents);
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace integration
|
|||
return LoadMaps(maps);
|
||||
}
|
||||
|
||||
OsrmRouterComponents const & GetAllMaps()
|
||||
OsrmRouterComponents & GetAllMaps()
|
||||
{
|
||||
static shared_ptr<OsrmRouterComponents> const inst = LoadAllMaps();
|
||||
ASSERT(inst, ());
|
||||
|
@ -255,14 +255,14 @@ namespace integration
|
|||
|
||||
void TestOnlineCrosses(m2::PointD const & startPoint, m2::PointD const & finalPoint,
|
||||
vector<string> const & expected,
|
||||
shared_ptr<OsrmRouterComponents> & routerComponents)
|
||||
OsrmRouterComponents & routerComponents)
|
||||
{
|
||||
routing::OnlineCrossFetcher fetcher(OSRM_ONLINE_SERVER_URL, startPoint, finalPoint);
|
||||
vector<m2::PointD> const & points = fetcher.GetMwmPoints();
|
||||
TEST_EQUAL(points.size(), expected.size(), ());
|
||||
for (m2::PointD const & point : points)
|
||||
{
|
||||
string const mwmName = routerComponents->GetSearchEngine()->GetCountryFile(point);
|
||||
string const mwmName = routerComponents.GetSearchEngine()->GetCountryFile(point);
|
||||
TEST(find(expected.begin(), expected.end(), mwmName) != expected.end(), ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace integration
|
|||
vector<string> const & expected,
|
||||
OsrmRouterComponents & routerComponents);
|
||||
|
||||
OsrmRouterComponents const & GetAllMaps();
|
||||
OsrmRouterComponents & GetAllMaps();
|
||||
shared_ptr<OsrmRouterComponents> LoadMaps(vector<string> const & mapNames);
|
||||
TRouteResult CalculateRoute(OsrmRouterComponents const & routerComponents,
|
||||
m2::PointD const & startPoint, m2::PointD const & startDirection,
|
||||
|
|
Loading…
Add table
Reference in a new issue