diff --git a/search/search_tests/locality_finder_test.cpp b/search/search_tests/locality_finder_test.cpp index b04dcaf686..fc2ea02dd1 100644 --- a/search/search_tests/locality_finder_test.cpp +++ b/search/search_tests/locality_finder_test.cpp @@ -2,6 +2,7 @@ #include "indexer/data_header.hpp" #include "indexer/index.hpp" +#include "indexer/classificator_loader.hpp" #include "search/locality_finder.hpp" @@ -37,13 +38,25 @@ void doTests2(search::LocalityFinder & finder, vector const & input, UNIT_TEST(LocalityFinder) { + classificator::Load(); + Index index; - auto const p = index.Register(platform::LocalCountryFile::MakeForTesting("World")); - TEST_EQUAL(MwmSet::RegResult::Success, p.second, ()); - MwmSet::MwmHandle const & handle = p.first; - TEST(handle.IsAlive(), ()); - shared_ptr info = handle.GetId().GetInfo(); - m2::RectD const & rect = info->m_limitRect; + m2::RectD rect; + + try + { + auto const p = index.Register(platform::LocalCountryFile::MakeForTesting("World")); + TEST_EQUAL(MwmSet::RegResult::Success, p.second, ()); + + MwmSet::MwmHandle const & handle = p.first; + TEST(handle.IsAlive(), ()); + + rect = handle.GetId().GetInfo()->m_limitRect; + } + catch (RootException const & ex) + { + LOG(LERROR, ("Read World.mwm error:", ex.Msg())); + } search::LocalityFinder finder(&index); finder.SetLanguage(StringUtf8Multilang::GetLangIndex("en"));