forked from organicmaps/organicmaps
[search] Added integration test for waterfall.
This commit is contained in:
parent
09494f5ede
commit
44374e7b23
1 changed files with 11 additions and 0 deletions
|
@ -283,7 +283,12 @@ UNIT_CLASS_TEST(SearchQueryV2Test, TestRankingInfo)
|
|||
TestStreet goldenGateStreet(
|
||||
vector<m2::PointD>{m2::PointD(-0.5, -0.5), m2::PointD(0, 0), m2::PointD(0.5, 0.5)},
|
||||
"Golden Gate Bridge", "en");
|
||||
|
||||
TestPOI goldenGateBridge(m2::PointD(0, 0), "Golden Gate Bridge", "en");
|
||||
|
||||
TestPOI waterfall(m2::PointD(0.5, 0.5), "", "en");
|
||||
waterfall.SetTypes({{"waterway", "waterfall"}});
|
||||
|
||||
TestPOI lermontov(m2::PointD(1, 1), "Лермонтовъ", "en");
|
||||
lermontov.SetTypes({{"amenity", "cafe"}});
|
||||
|
||||
|
@ -307,6 +312,7 @@ UNIT_CLASS_TEST(SearchQueryV2Test, TestRankingInfo)
|
|||
builder.Add(goldenGateBridge);
|
||||
builder.Add(goldenGateStreet);
|
||||
builder.Add(lermontov);
|
||||
builder.Add(waterfall);
|
||||
});
|
||||
|
||||
SetViewport(m2::RectD(m2::PointD(-0.5, -0.5), m2::PointD(0.5, 0.5)));
|
||||
|
@ -347,6 +353,11 @@ UNIT_CLASS_TEST(SearchQueryV2Test, TestRankingInfo)
|
|||
auto const & top = results.front();
|
||||
TEST(MatchResults(m_engine, {ExactMatch(wonderlandId, lermontov)}, {top}), ());
|
||||
}
|
||||
|
||||
{
|
||||
TRules rules{ExactMatch(wonderlandId, waterfall)};
|
||||
TEST(ResultsMatch("waterfall", rules), ());
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace search
|
||||
|
|
Loading…
Add table
Reference in a new issue