[search] Do not emit private swimming pools.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako 2024-04-08 15:48:21 -03:00 committed by Viktor Havaka
parent 29061a90c9
commit d2f16d58d8
2 changed files with 30 additions and 0 deletions

View file

@ -8049,6 +8049,10 @@ sw:Bwawa la kuogelea
fa:استخرشنا
mr:जलतरण तलाव
# Not searchable
leisure-swimming_pool-private
en:DoNotMatchThisType_OneLanguageDefinitionIsEnoughHere
sport-american_football
en:American Football
ar:كرة القدم الأمريكية

View file

@ -3641,4 +3641,30 @@ UNIT_CLASS_TEST(ProcessorTest, NonDrawable_Categories)
}
}
UNIT_CLASS_TEST(ProcessorTest, NonSearchable_Categories)
{
TestPOI yesPool({0, 0}, {}, {});
yesPool.SetTypes({{"leisure", "swimming_pool"}});
TestPOI noPool({0.1, 0.1}, {}, {});
noPool.SetTypes({{"leisure", "swimming_pool", "private"}});
auto wonderlandId = BuildCountry("Wonderland", [&](TestMwmBuilder & builder)
{
builder.Add(yesPool);
builder.Add(noPool);
});
SetViewport(m2::RectD(-0.5, -0.5, 0.5, 0.5));
{
Rules const rules = {ExactMatch(wonderlandId, yesPool)};
TEST(ResultsMatch("swimming pool", rules), ());
}
{
Rules const rules = {ExactMatch(wonderlandId, yesPool)};
TEST(ResultsMatch("бассейн", rules, "ru"), ());
}
}
} // namespace processor_test