diff --git a/search/search_integration_tests/processor_test.cpp b/search/search_integration_tests/processor_test.cpp index 5ccf69e555..8359ed47c3 100644 --- a/search/search_integration_tests/processor_test.cpp +++ b/search/search_integration_tests/processor_test.cpp @@ -2540,6 +2540,8 @@ UNIT_CLASS_TEST(ProcessorTest, ViewportFilter) UNIT_CLASS_TEST(ProcessorTest, FilterStreetPredictions) { + TestCity smallCity(m2::PointD(3.0, 0.0), "SmallCity", "en", 1 /* rank */); + TestStreet lenina0({m2::PointD(0.0, -1.0), m2::PointD(0.0, 1.0)}, "Lenina", "en"); TestStreet lenina1({m2::PointD(1.0, -1.0), m2::PointD(1.0, 1.0)}, "Lenina", "en"); TestStreet lenina2({m2::PointD(2.0, -1.0), m2::PointD(2.0, 1.0)}, "Lenina", "en"); @@ -2552,6 +2554,8 @@ UNIT_CLASS_TEST(ProcessorTest, FilterStreetPredictions) builder.Add(lenina3); }); + BuildWorld([&](TestMwmBuilder & builder) { builder.Add(smallCity); }); + SearchParams defaultParams; defaultParams.m_query = "Lenina"; defaultParams.m_inputLocale = "en"; @@ -2617,6 +2621,19 @@ UNIT_CLASS_TEST(ProcessorTest, FilterStreetPredictions) request.Run(); TEST(ResultsMatch(request.Results(), rules), ()); } + + { + Rules const rules = {ExactMatch(countryId, lenina0), ExactMatch(countryId, lenina3)}; + + auto params = defaultParams; + params.m_streetSearchRadiusM = + mercator::DistanceOnEarth(params.m_viewport.Center(), m2::PointD(1.0, 0.0)) - 1.0; + params.m_query = "SmallCity Lenina"; + + TestSearchRequest request(m_engine, params); + request.Run(); + TEST(ResultsMatch(request.Results(), rules), ()); + } } } // namespace } // namespace search