[generator] Fix generator integration tests

Tests were broken after ingoring barriers on some highways
This commit is contained in:
gmoryes 2020-01-17 17:12:15 +03:00 committed by Tatiana Yan
parent 1207236441
commit 98b307de61
2 changed files with 5 additions and 2 deletions

View file

@ -321,7 +321,7 @@ public:
TestGeneratedFile(maxSpeeds, 1301515 /* fileSize */);
TestGeneratedFile(metalines, 288032 /* fileSize */);
TestGeneratedFile(restrictions, 371110 /* fileSize */);
TestGeneratedFile(roadAccess, 1970528 /* fileSize */);
TestGeneratedFile(roadAccess, 1966468 /* fileSize */);
TestGeneratedFile(m_genInfo.m_citiesBoundariesFilename, 87 /* fileSize */);
}

View file

@ -299,7 +299,7 @@ void RoadAccessTagProcessor::Process(OsmElement const & elem)
for (auto const tagMapping : mapping)
{
auto const accessType = GetAccessTypeFromMapping(elem, tagMapping);
if (accessType != RoadAccess::Type::Count && accessType != RoadAccess::Type::Yes)
if (accessType != RoadAccess::Type::Count)
return optional<RoadAccess::Type>(accessType);
}
@ -308,6 +308,9 @@ void RoadAccessTagProcessor::Process(OsmElement const & elem)
if (auto op = getAccessType(m_accessMappings))
{
if (*op == RoadAccess::Type::Yes)
return;
switch (elem.m_type)
{
case OsmElement::EntityType::Node: m_barriersWithAccessTag.emplace(elem.m_id, *op); return;