From ea01aeb994129db98035f9f272f84c42c911671c Mon Sep 17 00:00:00 2001 From: Konstantin Pastbin Date: Wed, 11 Dec 2024 01:05:56 +0300 Subject: [PATCH] [tests] Fix for man_made=tower Signed-off-by: Konstantin Pastbin --- generator/generator_tests/osm_type_test.cpp | 10 +++++----- search/search_integration_tests/smoke_test.cpp | 9 ++------- search/types_skipper.cpp | 2 -- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/generator/generator_tests/osm_type_test.cpp b/generator/generator_tests/osm_type_test.cpp index 55dfcee87c..1316eba69c 100644 --- a/generator/generator_tests/osm_type_test.cpp +++ b/generator/generator_tests/osm_type_test.cpp @@ -2141,7 +2141,7 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_SimpleTypesSmoke) // {"area:highway", "track"}, // {"area:highway", "trunk"}, // {"area:highway", "unclassified"}, - // {"barrier", "cycle_barrier"}, + {"barrier", "cycle_barrier"}, // {"boundary", "administrative"}, // {"communication", "line"}, // {"earthquake:damage", "spontaneous_camp"}, @@ -2152,13 +2152,13 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_SimpleTypesSmoke) // {"landuse", "greenfield"}, // {"landuse", "greenhouse_horticulture"}, // {"landuse", "retail"}, - // {"man_made", "cairn"}, + {"man_made", "cairn"}, // {"man_made", "pipeline"}, // {"man_made", "surveillance"}, - // {"man_made", "tower"}, + {"man_made", "tower"}, // {"man_made", "wastewater_plant"}, - // {"man_made", "water_tower"}, - // {"man_made", "water_well"}, + {"man_made", "water_tower"}, + {"man_made", "water_well"}, // {"mapswithme", "grid"}, // {"military", "bunker"}, // {"natural", "cliff"}, diff --git a/search/search_integration_tests/smoke_test.cpp b/search/search_integration_tests/smoke_test.cpp index 1eb3b8206a..6c793b7d4d 100644 --- a/search/search_integration_tests/smoke_test.cpp +++ b/search/search_integration_tests/smoke_test.cpp @@ -231,8 +231,6 @@ UNIT_CLASS_TEST(SmokeTest, CategoriesTest) // No point drawing rules for country scale range. base::StringIL const arrInvisible[] = { - {"man_made", "tower"}, - {"place", "continent"}, {"place", "county"}, {"place", "region"}, @@ -248,7 +246,6 @@ UNIT_CLASS_TEST(SmokeTest, CategoriesTest) {"highway", "motorway_junction"}, {"landuse"}, {"man_made", "chimney"}, - {"man_made", "tower"}, {"natural"}, {"office"}, {"place"}, @@ -264,12 +261,10 @@ UNIT_CLASS_TEST(SmokeTest, CategoriesTest) for (auto const & tags : arrNoEmptyNames) noEmptyNames.insert(cl.GetTypeByPath(tags)); - uint32_t const commTower = cl.GetTypeByPath({"man_made", "tower", "communication"}); ftypes::TwoLevelPOIChecker isPoi; - auto const isNoEmptyName = [commTower, &isPoi, &noEmptyNames](uint32_t t) + auto const isNoEmptyName = [&isPoi, &noEmptyNames](uint32_t t) { - if (t != commTower) - ftype::TruncValue(t, 2); + ftype::TruncValue(t, 2); if (noEmptyNames.count(t) > 0) return true; diff --git a/search/types_skipper.cpp b/search/types_skipper.cpp index 96de34d35e..dd03773b32 100644 --- a/search/types_skipper.cpp +++ b/search/types_skipper.cpp @@ -21,10 +21,8 @@ TypesSkipper::TypesSkipper() for (auto const & e : arrSkipEmptyName1) m_skipIfEmptyName[0].push_back(c.GetTypeByPath(e)); - // Test for exact type (man_made-tower-communication is not). StringIL const arrSkipEmptyNameExact[] = { {"man_made", "chimney"}, - {"man_made", "tower"}, }; for (auto const & e : arrSkipEmptyNameExact) m_skipIfEmptyName[1].push_back(c.GetTypeByPath(e));