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:
authorMaxim Pimenov <m@maps.me>2017-11-17 16:01:54 +0300
committerArsentiy Milchakov <milcars@mapswithme.com>2017-11-17 17:34:25 +0300
commit50653171ff545219eae083cffa5106baeeea325d (patch)
treec382b7c754a88e54d6243752412c76d5d9a59e5a /storage
parente03e986c71969db0d3d5b625224368715252c6e8 (diff)
[platform] [tests] Added an option to ScopedFile.
The option allows one to push responsibility on the user of the ScopedFile, that is, enables a scenario where a ScopedFile does not try to create the file on disk but only assures the cleanup.
Diffstat (limited to 'storage')
-rw-r--r--storage/storage_tests/storage_tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/storage_tests/storage_tests.cpp b/storage/storage_tests/storage_tests.cpp
index a04994f98c..6392f0b6f9 100644
--- a/storage/storage_tests/storage_tests.cpp
+++ b/storage/storage_tests/storage_tests.cpp
@@ -914,7 +914,7 @@ UNIT_CLASS_TEST(StorageTest, CancelDownloadingWhenAlmostDone)
UNIT_CLASS_TEST(StorageTest, DeleteCountry)
{
- tests_support::ScopedFile map("Wonderland.mwm", "map");
+ tests_support::ScopedFile map("Wonderland.mwm", ScopedFile::Mode::Create);
LocalCountryFile file = LocalCountryFile::MakeForTesting("Wonderland",
version::FOR_TESTING_SINGLE_MWM1);
TEST_EQUAL(MapOptions::MapWithCarRouting, file.GetFiles(), ());
@@ -940,7 +940,7 @@ UNIT_CLASS_TEST(StorageTest, DeleteCountry)
UNIT_CLASS_TEST(TwoComponentStorageTest, DeleteCountry)
{
- tests_support::ScopedFile map("Wonderland.mwm", "map");
+ tests_support::ScopedFile map("Wonderland.mwm", ScopedFile::Mode::Create);
LocalCountryFile file = LocalCountryFile::MakeForTesting("Wonderland",
version::FOR_TESTING_TWO_COMPONENT_MWM1);
TEST_EQUAL(MapOptions::Map, file.GetFiles(), ());
@@ -1003,12 +1003,12 @@ UNIT_TEST(StorageTest_ObsoleteMapsRemoval)
CountryFile country("Azerbaijan");
tests_support::ScopedDir dir1("1");
- tests_support::ScopedFile map1(dir1, country, MapOptions::Map, "map1");
+ tests_support::ScopedFile map1(dir1, country, MapOptions::Map);
LocalCountryFile file1(dir1.GetFullPath(), country, 1 /* version */);
CountryIndexes::PreparePlaceOnDisk(file1);
tests_support::ScopedDir dir2("2");
- tests_support::ScopedFile map2(dir2, country, MapOptions::Map, "map2");
+ tests_support::ScopedFile map2(dir2, country, MapOptions::Map);
LocalCountryFile file2(dir2.GetFullPath(), country, 2 /* version */);
CountryIndexes::PreparePlaceOnDisk(file2);