forked from organicmaps/organicmaps
Added nice DebugPrint for search::Result.
This commit is contained in:
parent
209672dffa
commit
d0ed3ab490
2 changed files with 3 additions and 8 deletions
|
@ -320,13 +320,8 @@ string DebugPrint(AddressInfo const & info)
|
|||
|
||||
string DebugPrint(Result const & r)
|
||||
{
|
||||
string s;
|
||||
s.append(r.GetString());
|
||||
s.append("|");
|
||||
s.append(r.GetFeatureType());
|
||||
s.append("|");
|
||||
s.append(r.IsSuggest() ? "1" : "0");
|
||||
return s;
|
||||
return "Result { Name: " + r.GetString() + "; Type: " + r.GetFeatureType() +
|
||||
"; Info: " + DebugPrint(r.GetRankingInfo()) + " }";
|
||||
}
|
||||
|
||||
} // namespace search
|
||||
|
|
|
@ -334,7 +334,7 @@ UNIT_CLASS_TEST(SearchQueryV2Test, TestRankingInfo)
|
|||
for (auto const & result : request.Results())
|
||||
{
|
||||
auto const & info = result.GetRankingInfo();
|
||||
TEST_EQUAL(NAME_SCORE_FULL_MATCH, info.m_nameScore, ());
|
||||
TEST_EQUAL(NAME_SCORE_FULL_MATCH, info.m_nameScore, (result));
|
||||
TEST(my::AlmostEqualAbs(1.0, info.m_nameCoverage, 1e-6), (info.m_nameCoverage));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue