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:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2017-09-14 11:20:37 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2017-09-14 14:16:15 +0300
commite0ff48f1713f549ce5d2293c62a1cd09453ee26c (patch)
tree4e12449e1c519b9d9f1c9edbd904346cb605e26b /storage
parente54ef9b9c7fa342920ff0a637a8ce7cb93205ba8 (diff)
Fixed storage tests
Diffstat (limited to 'storage')
-rw-r--r--storage/storage_tests/storage_tests.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/storage/storage_tests/storage_tests.cpp b/storage/storage_tests/storage_tests.cpp
index bb0502ef21..645e81aa12 100644
--- a/storage/storage_tests/storage_tests.cpp
+++ b/storage/storage_tests/storage_tests.cpp
@@ -844,29 +844,24 @@ UNIT_CLASS_TEST(TwoComponentStorageTest, DownloadTwoCountriesAndDelete)
unique_ptr<CountryDownloaderChecker> uruguayChecker = make_unique<CountryDownloaderChecker>(
storage, uruguayCountryId, MapOptions::MapWithCarRouting,
vector<Status>{Status::ENotDownloaded, Status::EDownloading, Status::ENotDownloaded});
- // Only routing file will be deleted for Venezuela, thus, Venezuela should pass through
- // following
- // states:
- // NotDownloaded -> InQueue (Venezuela is added after Uruguay) -> Downloading -> Downloading
- // (second notification will be sent after deletion of a routing file) -> OnDisk.
+ // Venezuela should pass through the following states:
+ // NotDownloaded -> InQueue (Venezuela is added after Uruguay) -> Downloading -> NotDownloaded.
unique_ptr<CountryDownloaderChecker> venezuelaChecker = make_unique<CountryDownloaderChecker>(
storage, venezuelaCountryId, MapOptions::MapWithCarRouting,
vector<Status>{Status::ENotDownloaded, Status::EInQueue, Status::EDownloading,
- Status::EDownloading, Status::EOnDisk});
+ Status::ENotDownloaded});
uruguayChecker->StartDownload();
venezuelaChecker->StartDownload();
storage.DeleteCountry(uruguayCountryId, MapOptions::Map);
- storage.DeleteCountry(venezuelaCountryId, MapOptions::CarRouting);
+ storage.DeleteCountry(venezuelaCountryId, MapOptions::Map);
runner.Run();
}
- // @TODO(bykoianko) This test changed its behaivier. This commented lines are left specially
- // to fixed later.
+
TLocalFilePtr uruguayFile = storage.GetLatestLocalFile(uruguayCountryId);
TEST(!uruguayFile.get(), (*uruguayFile));
TLocalFilePtr venezuelaFile = storage.GetLatestLocalFile(venezuelaCountryId);
- TEST(venezuelaFile.get(), ());
- TEST_EQUAL(MapOptions::Map, venezuelaFile->GetFiles(), ());
+ TEST(!venezuelaFile.get(), ());
}
UNIT_CLASS_TEST(StorageTest, CancelDownloadingWhenAlmostDone)