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 /indexer/indexer_tests
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 'indexer/indexer_tests')
-rw-r--r--indexer/indexer_tests/osm_editor_test.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indexer/indexer_tests/osm_editor_test.cpp b/indexer/indexer_tests/osm_editor_test.cpp
index 32790b9d58..55f8f97370 100644
--- a/indexer/indexer_tests/osm_editor_test.cpp
+++ b/indexer/indexer_tests/osm_editor_test.cpp
@@ -21,6 +21,7 @@
using namespace generator::tests_support;
using namespace indexer::tests_support;
+using platform::tests_support::ScopedFile;
namespace
{
@@ -648,7 +649,7 @@ void EditorTest::HaveMapEditsOrNotesToUploadTest()
editor.ClearAllLocalEdits();
TEST(!editor.HaveMapEditsOrNotesToUpload(), ());
- platform::tests_support::ScopedFile sf("test_notes.xml");
+ ScopedFile sf("test_notes.xml", ScopedFile::Mode::DoNotCreate);
editor.m_notes = Notes::MakeNotes(sf.GetFullPath(), true);
@@ -825,11 +826,9 @@ void EditorTest::CreateNoteTest()
builder.Add(TestCafe(m2::PointD(2.0, 2.0), "Cafe", "en"));
});
- auto const createAndCheckNote = [&editor](FeatureID const & fId,
- ms::LatLon const & pos,
- osm::Editor::NoteProblemType const noteType)
- {
- platform::tests_support::ScopedFile sf("test_notes.xml");
+ auto const createAndCheckNote = [&editor](FeatureID const & fId, ms::LatLon const & pos,
+ osm::Editor::NoteProblemType const noteType) {
+ ScopedFile sf("test_notes.xml", ScopedFile::Mode::DoNotCreate);
editor.m_notes = Notes::MakeNotes(sf.GetFullPath(), true);
feature::TypesHolder holder;
holder.Assign(classif().GetTypeByPath({"amenity", "restaurant"}));