diff options
author | Yuri Gorshenin <y@maps.me> | 2017-12-05 19:30:44 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-12-06 11:34:01 +0300 |
commit | 97e745281ecda8a4aaa761eba589d4939b42188c (patch) | |
tree | 1d1a9048808ce2f9cd50d6e609de3ba26ab08bb4 /indexer/indexer_tests_support | |
parent | 006506aad384326f57d89084215d82a5cb7a197b (diff) |
[map] Fixed Framework shutdown.
Diffstat (limited to 'indexer/indexer_tests_support')
-rw-r--r-- | indexer/indexer_tests_support/helpers.cpp | 8 | ||||
-rw-r--r-- | indexer/indexer_tests_support/helpers.hpp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/indexer/indexer_tests_support/helpers.cpp b/indexer/indexer_tests_support/helpers.cpp index 0f748989e8..9e3b04a9e1 100644 --- a/indexer/indexer_tests_support/helpers.cpp +++ b/indexer/indexer_tests_support/helpers.cpp @@ -13,5 +13,13 @@ void SetUpEditorForTesting(unique_ptr<osm::Editor::Delegate> delegate) editor.SetStorageForTesting(make_unique<editor::InMemoryStorage>()); editor.ClearAllLocalEdits(); } + +void TearDownEditorForTesting() +{ + auto & editor = osm::Editor::Instance(); + editor.ClearAllLocalEdits(); + editor.SetDelegate({}); + editor.SetDefaultStorage(); +} } // namespace tests_support } // namespace indexer diff --git a/indexer/indexer_tests_support/helpers.hpp b/indexer/indexer_tests_support/helpers.hpp index 5adfbb0768..1a26a3a327 100644 --- a/indexer/indexer_tests_support/helpers.hpp +++ b/indexer/indexer_tests_support/helpers.hpp @@ -12,6 +12,7 @@ namespace indexer namespace tests_support { void SetUpEditorForTesting(unique_ptr<osm::Editor::Delegate> delegate); +void TearDownEditorForTesting(); template <typename TFn> void EditFeature(FeatureType const & ft, TFn && fn) |