[search] review fixes

This commit is contained in:
Arsentiy Milchakov 2019-02-13 19:33:37 +03:00 committed by mpimenov
parent 7ce48aa53c
commit 184d8463c9
2 changed files with 5 additions and 6 deletions

View file

@ -26,12 +26,12 @@ void TestAddress(ReverseGeocoder & coder, ms::LatLon const & ll, std::string con
ReverseGeocoder::Address addr;
coder.GetNearbyAddress(MercatorBounds::FromLatLon(ll), addr);
std::string const etalonKey =
std::string const expectedKey =
strings::ToUtf8(GetStreetNameAsKey(street, false /* ignoreStreetSynonyms */));
std::string const resultKey =
strings::ToUtf8(GetStreetNameAsKey(addr.m_street.m_name, false /* ignoreStreetSynonyms */));
TEST_EQUAL(resultKey, etalonKey, (addr));
TEST_EQUAL(resultKey, expectedKey, (addr));
TEST_EQUAL(houseNumber, addr.GetHouseNumber(), (addr));
}

View file

@ -15,10 +15,9 @@
#include "platform/platform.hpp"
#include "platform/preferred_languages.hpp"
#include "coding/string_utf8_multilang.hpp"
#include "coding/file_name_utils.hpp"
#include "coding/internal/file_data.hpp"
#include "coding/string_utf8_multilang.hpp"
#include <array>
#include <fstream>
@ -443,12 +442,12 @@ UNIT_TEST(Bookmarks_Getting)
namespace
{
void CheckPlace(Framework const & fm, std::shared_ptr<MwmInfo> mwmInfo, double lat, double lon,
void CheckPlace(Framework const & fm, shared_ptr<MwmInfo> mwmInfo, double lat, double lon,
StringUtf8Multilang const & streetNames, string const & houseNumber)
{
auto const info = fm.GetAddressAtPoint(MercatorBounds::FromLatLon(lat, lon));
std::string streetName;
string streetName;
auto const deviceLang = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm());
feature::GetReadableName(mwmInfo->GetRegionData(), streetNames, deviceLang,
false /* allowTranslit */, streetName);