Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgorshenin <y.gorshenin@corp.mail.ru>2015-07-01 16:48:58 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:53:27 +0300
commita7bcdb5ae8b8e75c1a3806b00b19f3b80c72c5b3 (patch)
treee24caedef110b579fcedc15d29c62cc43e3f6d9c /map/mwm_tests
parente0470160313b3ed0bc396ffec72b16fded6b8520 (diff)
Revert "[storage, framework, index] Storage redesign. Plain strings are replaced to CountryFile and LocalCountryFile."
Diffstat (limited to 'map/mwm_tests')
-rw-r--r--map/mwm_tests/multithread_mwm_test.cpp2
-rw-r--r--map/mwm_tests/mwm_foreach_test.cpp14
-rw-r--r--map/mwm_tests/mwm_index_test.cpp13
3 files changed, 16 insertions, 13 deletions
diff --git a/map/mwm_tests/multithread_mwm_test.cpp b/map/mwm_tests/multithread_mwm_test.cpp
index 974cb436a4..22529e5752 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(platform::LocalCountryFile::MakeForTesting(file)));
+ UNUSED_VALUE(src.RegisterMap(file + DATA_FILE_EXTENSION));
// 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 ce23dc7eea..6036885f89 100644
--- a/map/mwm_tests/mwm_foreach_test.cpp
+++ b/map/mwm_tests/mwm_foreach_test.cpp
@@ -247,18 +247,17 @@ public:
}
};
-void RunTest(string const & countryFileName)
+void RunTest(string const & file)
{
model::FeaturesFetcher src1;
src1.InitClassificator();
- platform::LocalCountryFile localFile(platform::LocalCountryFile::MakeForTesting(countryFileName));
- UNUSED_VALUE(src1.RegisterMap(localFile));
+ UNUSED_VALUE(src1.RegisterMap(file));
vector<m2::RectD> rects;
rects.push_back(src1.GetWorldRect());
- ModelReaderPtr reader = GetPlatform().GetCountryReader(localFile, TMapOptions::EMap);
+ ModelReaderPtr reader = GetPlatform().GetReader(file);
while (!rects.empty())
{
@@ -302,10 +301,15 @@ void RunTest(string const & countryFileName)
}
}
+void RunTestForChoice(string const & fName)
+{
+ RunTest(fName + DATA_FILE_EXTENSION);
+}
+
}
UNIT_TEST(ForEach_QueryResults)
{
- RunTest("minsk-pass");
+ RunTestForChoice("minsk-pass");
//RunTestForChoice("london-center");
}
diff --git a/map/mwm_tests/mwm_index_test.cpp b/map/mwm_tests/mwm_index_test.cpp
index 700d1ddf12..5f3b3e509e 100644
--- a/map/mwm_tests/mwm_index_test.cpp
+++ b/map/mwm_tests/mwm_index_test.cpp
@@ -36,11 +36,10 @@ public:
}
};
-bool RunTest(string const & countryFileName, int lowS, int highS)
+bool RunTest(string const & fileName, int lowS, int highS)
{
model::FeaturesFetcher src;
- pair<MwmSet::MwmLock, bool> const p =
- src.RegisterMap(platform::LocalCountryFile::MakeForTesting(countryFileName));
+ pair<MwmSet::MwmLock, bool> const p = src.RegisterMap(fileName);
if (!p.second)
return false;
MwmSet::MwmLock const & lock = p.first;
@@ -67,8 +66,8 @@ UNIT_TEST(ForEachFeatureID_Test)
classificator::Load();
/// @todo Uncomment World* checking after next map data update.
- // 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()), ());
+ //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()), ());
}