diff options
author | Yuri Gorshenin <y@maps.me> | 2015-07-01 16:55:50 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:53:33 +0300 |
commit | 54e5990c7e4c65b0749c21ce4fe3866909a29668 (patch) | |
tree | ec9f80550c7402b7d5f577773353c0d7eb6fb0a7 /map/mwm_tests | |
parent | 025f73ad85d489c4ea143b9d95dde4d308daf89b (diff) |
Revert "Merge pull request #1068 from maps/revert-929-abstract-country-file"
This reverts commit 66aac38c3004d261ee06a16f7e9db372f67614df, reversing
changes made to ad8708944070f6b32a17fbb944d3c493b3fb2a24.
Diffstat (limited to 'map/mwm_tests')
-rw-r--r-- | map/mwm_tests/multithread_mwm_test.cpp | 2 | ||||
-rw-r--r-- | map/mwm_tests/mwm_foreach_test.cpp | 14 | ||||
-rw-r--r-- | map/mwm_tests/mwm_index_test.cpp | 13 |
3 files changed, 13 insertions, 16 deletions
diff --git a/map/mwm_tests/multithread_mwm_test.cpp b/map/mwm_tests/multithread_mwm_test.cpp index 22529e5752..974cb436a4 100644 --- a/map/mwm_tests/multithread_mwm_test.cpp +++ b/map/mwm_tests/multithread_mwm_test.cpp @@ -63,7 +63,7 @@ namespace SourceT src; src.InitClassificator(); - UNUSED_VALUE(src.RegisterMap(file + DATA_FILE_EXTENSION)); + UNUSED_VALUE(src.RegisterMap(platform::LocalCountryFile::MakeForTesting(file))); // Check that country rect is valid and not infinity. m2::RectD const r = src.GetWorldRect(); diff --git a/map/mwm_tests/mwm_foreach_test.cpp b/map/mwm_tests/mwm_foreach_test.cpp index 6036885f89..ce23dc7eea 100644 --- a/map/mwm_tests/mwm_foreach_test.cpp +++ b/map/mwm_tests/mwm_foreach_test.cpp @@ -247,17 +247,18 @@ public: } }; -void RunTest(string const & file) +void RunTest(string const & countryFileName) { model::FeaturesFetcher src1; src1.InitClassificator(); - UNUSED_VALUE(src1.RegisterMap(file)); + platform::LocalCountryFile localFile(platform::LocalCountryFile::MakeForTesting(countryFileName)); + UNUSED_VALUE(src1.RegisterMap(localFile)); vector<m2::RectD> rects; rects.push_back(src1.GetWorldRect()); - ModelReaderPtr reader = GetPlatform().GetReader(file); + ModelReaderPtr reader = GetPlatform().GetCountryReader(localFile, TMapOptions::EMap); while (!rects.empty()) { @@ -301,15 +302,10 @@ void RunTest(string const & file) } } -void RunTestForChoice(string const & fName) -{ - RunTest(fName + DATA_FILE_EXTENSION); -} - } UNIT_TEST(ForEach_QueryResults) { - RunTestForChoice("minsk-pass"); + RunTest("minsk-pass"); //RunTestForChoice("london-center"); } diff --git a/map/mwm_tests/mwm_index_test.cpp b/map/mwm_tests/mwm_index_test.cpp index 5f3b3e509e..700d1ddf12 100644 --- a/map/mwm_tests/mwm_index_test.cpp +++ b/map/mwm_tests/mwm_index_test.cpp @@ -36,10 +36,11 @@ public: } }; -bool RunTest(string const & fileName, int lowS, int highS) +bool RunTest(string const & countryFileName, int lowS, int highS) { model::FeaturesFetcher src; - pair<MwmSet::MwmLock, bool> const p = src.RegisterMap(fileName); + pair<MwmSet::MwmLock, bool> const p = + src.RegisterMap(platform::LocalCountryFile::MakeForTesting(countryFileName)); if (!p.second) return false; MwmSet::MwmLock const & lock = p.first; @@ -66,8 +67,8 @@ UNIT_TEST(ForEachFeatureID_Test) classificator::Load(); /// @todo Uncomment World* checking after next map data update. - //TEST(RunTest("World.mwm", 0, scales::GetUpperWorldScale()), ()); - //TEST(RunTest("WorldCoasts.mwm", 0, scales::GetUpperWorldScale()), ()); - //TEST(RunTest("Belarus.mwm", scales::GetUpperWorldScale() + 1, scales::GetUpperStyleScale()), ()); - TEST(RunTest("minsk-pass.mwm", scales::GetUpperWorldScale() + 1, scales::GetUpperStyleScale()), ()); + // TEST(RunTest("World", 0, scales::GetUpperWorldScale()), ()); + // TEST(RunTest("WorldCoasts.mwm", 0, scales::GetUpperWorldScale()), ()); + // TEST(RunTest("Belarus", scales::GetUpperWorldScale() + 1, scales::GetUpperStyleScale()), ()); + TEST(RunTest("minsk-pass", scales::GetUpperWorldScale() + 1, scales::GetUpperStyleScale()), ()); } |