diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2019-06-07 10:37:23 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-06-11 14:04:41 +0300 |
commit | 9213224293daab92d34f3b19bbea3c6e7bc5d111 (patch) | |
tree | 26c77f6bce95ebda0737a343b0b13c70755a552f /routing | |
parent | d5914cbce6a5abfa9795e3780f38a8c8e1ccef92 (diff) |
[routing] Fixing routing quality and integration tests after packed_polygons.bin update.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/routing_integration_tests/routing_test_tools.cpp | 4 | ||||
-rw-r--r-- | routing/routing_quality/utils.cpp | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/routing/routing_integration_tests/routing_test_tools.cpp b/routing/routing_integration_tests/routing_test_tools.cpp index a375291d5f..a7391f7a60 100644 --- a/routing/routing_integration_tests/routing_test_tools.cpp +++ b/routing/routing_integration_tests/routing_test_tools.cpp @@ -18,6 +18,7 @@ #include "indexer/data_source.hpp" #include "storage/country_parent_getter.hpp" +#include "storage/storage.hpp" #include "platform/local_country_file.hpp" #include "platform/local_country_file_utils.hpp" @@ -102,13 +103,14 @@ unique_ptr<IndexRouter> CreateVehicleRouter(DataSource & dataSource, return infoGetter.GetLimitRectForLeaf(countryId); }; + storage::Storage storage; auto numMwmIds = make_shared<NumMwmIds>(); for (auto const & f : localFiles) { auto const & countryFile = f.GetCountryFile(); auto const mwmId = dataSource.GetMwmIdByCountryFile(countryFile); CHECK(mwmId.IsAlive(), ()); - if (mwmId.GetInfo()->GetType() == MwmInfo::COUNTRY && countryFile.GetName() != "minsk-pass") + if (storage.IsLeaf(countryFile.GetName())) numMwmIds->RegisterFile(countryFile); } diff --git a/routing/routing_quality/utils.cpp b/routing/routing_quality/utils.cpp index cc55ab4e9c..582754ef6f 100644 --- a/routing/routing_quality/utils.cpp +++ b/routing/routing_quality/utils.cpp @@ -76,17 +76,17 @@ private: classificator::Load(); vector<platform::LocalCountryFile> localFiles; - platform::FindAllLocalMapsAndCleanup(numeric_limits<int64_t>::max(), localFiles); + platform::FindAllLocalMapsAndCleanup(numeric_limits<int64_t>::max(), localFiles); for (auto const & localFile : localFiles) { UNUSED_VALUE(m_dataSource.RegisterMap(localFile)); auto const & countryFile = localFile.GetCountryFile(); auto const mwmId = m_dataSource.GetMwmIdByCountryFile(countryFile); CHECK(mwmId.IsAlive(), ()); - // We have to exclude minsk-pass because we can't register mwm which is not from - // countries.txt. - if (mwmId.GetInfo()->GetType() == MwmInfo::COUNTRY && countryFile.GetName() != "minsk-pass") + + // Only maps from countries.txt should be used for tests. + if (m_cpg->GetStorageForTesting().IsLeaf(countryFile.GetName())) m_numMwmIds->RegisterFile(countryFile); } } |