Rebasing on master and solving conflicts.

This commit is contained in:
Vladimir Byko-Ianko 2015-05-14 15:22:15 +03:00 committed by Alex Zolotarev
parent b0090c9b83
commit 28dccd645c
3 changed files with 5 additions and 5 deletions

View file

@ -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);
}

View file

@ -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(), ());
}
}

View file

@ -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,