From 50653171ff545219eae083cffa5106baeeea325d Mon Sep 17 00:00:00 2001 From: Maxim Pimenov Date: Fri, 17 Nov 2017 16:01:54 +0300 Subject: [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. --- storage/storage_tests/storage_tests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'storage') 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); -- cgit v1.2.3