diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-02-02 17:31:11 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:21:32 +0300 |
commit | dbe555605f496e65df0e762bec3dc3da75e009d5 (patch) | |
tree | 2f5902d58d8411a421ba73e216ec93b59522be1a /routing/routing_tests | |
parent | de3a5b9df15bfc5b3c957197921cc369753d0998 (diff) |
[new downloader] Moving new developed map downloader functionality to new map downloader branch.
Diffstat (limited to 'routing/routing_tests')
-rw-r--r-- | routing/routing_tests/osrm_router_test.cpp | 3 | ||||
-rw-r--r-- | routing/routing_tests/routing_mapping_test.cpp | 20 |
2 files changed, 15 insertions, 8 deletions
diff --git a/routing/routing_tests/osrm_router_test.cpp b/routing/routing_tests/osrm_router_test.cpp index 8835e0c0e4..423b162662 100644 --- a/routing/routing_tests/osrm_router_test.cpp +++ b/routing/routing_tests/osrm_router_test.cpp @@ -60,7 +60,8 @@ void TestMapping(InputDataT const & data, platform::LocalCountryFile localFile(GetPlatform().WritableDir(), country, 0 /* version */); localFile.SyncWithDisk(); platform::tests_support::ScopedMwm mapMwm( - localFile.GetCountryFile().GetNameWithExt(MapOptions::Map)); + platform::GetFileName(localFile.GetCountryFile().GetName(), MapOptions::Map, + version::FOR_TESTING_TWO_COMPONENT_MWM1)); static char const ftSegsPath[] = "test1.tmp"; platform::CountryIndexes::PreparePlaceOnDisk(localFile); diff --git a/routing/routing_tests/routing_mapping_test.cpp b/routing/routing_tests/routing_mapping_test.cpp index e8a5514132..45fe8a33e8 100644 --- a/routing/routing_tests/routing_mapping_test.cpp +++ b/routing/routing_tests/routing_mapping_test.cpp @@ -29,7 +29,10 @@ public: // MapOptions::Map is used as a parameter of CountryFile::GetNameWithExt() method. LocalFileGenerator(string const & fileName) : m_countryFile(fileName), - m_testDataFile(m_countryFile.GetNameWithExt(MapOptions::Map), "routing"), + m_testMapFile(platform::GetFileName(m_countryFile.GetName(), MapOptions::Map, + version::FOR_TESTING_TWO_COMPONENT_MWM1), "map"), + m_testRoutingFile(platform::GetFileName(m_countryFile.GetName(), MapOptions::CarRouting, + version::FOR_TESTING_TWO_COMPONENT_MWM1), "map"), m_localFile(GetPlatform().WritableDir(), m_countryFile, 0 /* version */) { m_localFile.SyncWithDisk(); @@ -43,23 +46,26 @@ public: TestMwmSet & GetMwmSet() { return m_testSet; } - string const & GetCountryName() { return m_countryFile.GetNameWithoutExt(); } + string const & GetCountryName() { return m_countryFile.GetName(); } size_t GetNumRefs() { return m_result.first.GetInfo()->GetNumRefs(); } private: void GenerateNecessarySections(LocalCountryFile const & localFile) { - FilesContainerW dataCont(localFile.GetPath(MapOptions::CarRouting)); + FilesContainerW routingCont(localFile.GetPath(MapOptions::CarRouting)); + // Write version for routing file that is equal to correspondent mwm file. + FilesContainerW mwmCont(localFile.GetPath(MapOptions::Map)); - FileWriter w1 = dataCont.GetWriter(VERSION_FILE_TAG); + FileWriter w1 = routingCont.GetWriter(VERSION_FILE_TAG); + FileWriter w2 = mwmCont.GetWriter(VERSION_FILE_TAG); version::WriteVersion(w1, my::TodayAsYYMMDD()); - FileWriter w2 = dataCont.GetWriter(ROUTING_MATRIX_FILE_TAG); - w2.Write("smth", 4); + version::WriteVersion(w2, my::TodayAsYYMMDD()); } CountryFile m_countryFile; - ScopedFile m_testDataFile; + ScopedFile m_testMapFile; + ScopedFile m_testRoutingFile; LocalCountryFile m_localFile; TestMwmSet m_testSet; pair<MwmSet::MwmId, MwmSet::RegResult> m_result; |