forked from organicmaps/organicmaps
Integration online test fixes.
This commit is contained in:
parent
933bc591aa
commit
1a6237859b
2 changed files with 17 additions and 4 deletions
|
@ -8,8 +8,13 @@ namespace
|
|||
UNIT_TEST(OnlineCrossFetcherSmokeTest)
|
||||
{
|
||||
integration::IRouterComponents & routerComponents = integration::GetOsrmComponents();
|
||||
TestOnlineFetcher({61.76, 34.45}, {45.07, 38.94},
|
||||
{"Russia_Central", "Russia_Southern", "Russia_Northwestern"}, routerComponents);
|
||||
TestOnlineFetcher(
|
||||
{61.76, 34.45}, {45.07, 38.94},
|
||||
{"Russia_Central", "Russia_Central", "Russia_Central", "Russia_Central", "Russia_Central",
|
||||
"Russia_Central", "Russia_Central", "Russia_Central", "Russia_Central", "Russia_Central",
|
||||
"Russia_Central", "Russia_Central", "Russia_Central", "Russia_Central", "Russia_Southern",
|
||||
"Russia_Southern", "Russia_Northwestern", "Russia_Northwestern"},
|
||||
routerComponents);
|
||||
}
|
||||
|
||||
UNIT_TEST(OnlineRussiaNorthToSouthTest)
|
||||
|
|
|
@ -301,13 +301,21 @@ namespace integration
|
|||
routing::OnlineCrossFetcher fetcher(OSRM_ONLINE_SERVER_URL, startPoint, finalPoint);
|
||||
fetcher.Do();
|
||||
vector<m2::PointD> const & points = fetcher.GetMwmPoints();
|
||||
TEST_EQUAL(points.size(), expected.size(), ());
|
||||
set<string> foundMwms;
|
||||
|
||||
// Start/stop mwm workaround. Remove after borders migration.
|
||||
foundMwms.insert(routerComponents.GetCountryInfoGetter().GetRegionFile(
|
||||
MercatorBounds::FromLatLon(startPoint)));
|
||||
foundMwms.insert(routerComponents.GetCountryInfoGetter().GetRegionFile(
|
||||
MercatorBounds::FromLatLon(finalPoint)));
|
||||
|
||||
for (m2::PointD const & point : points)
|
||||
{
|
||||
string const mwmName = routerComponents.GetCountryInfoGetter().GetRegionFile(point);
|
||||
TEST(find(expected.begin(), expected.end(), mwmName) != expected.end(),
|
||||
("Can't find ", mwmName));
|
||||
foundMwms.insert(mwmName);
|
||||
}
|
||||
TestOnlineFetcher(startPoint, finalPoint, expected, routerComponents);
|
||||
TEST_EQUAL(expected.size(), foundMwms.size(), ());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue