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
path: root/search
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2015-07-22 19:38:37 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:57:16 +0300
commitb0af8afca79ef7b217a88e2309298bc6fa90e01d (patch)
tree6f136e5e56677f6bf84db4b0b7770005be2dc9c6 /search
parent775728905f756ab2c9f958d5d150e313485555f1 (diff)
Fixed test.
Diffstat (limited to 'search')
-rw-r--r--search/search_tests/locality_finder_test.cpp25
1 files changed, 19 insertions, 6 deletions
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<m2::PointD> 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<MwmInfo> 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"));