From b0d143fe80af151d9bd7e3c47aed10eda33f689a Mon Sep 17 00:00:00 2001 From: tatiana-yan Date: Mon, 9 Sep 2019 19:01:07 +0300 Subject: [PATCH] [types] Replace drinkable=yes -> amenity=drinking_water. --- data/replaced_tags.txt | 1 + generator/generator_tests/osm_type_test.cpp | 9 ++++++--- indexer/feature_data.cpp | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/data/replaced_tags.txt b/data/replaced_tags.txt index 752c915622..68f862afd8 100644 --- a/data/replaced_tags.txt +++ b/data/replaced_tags.txt @@ -6,6 +6,7 @@ restaurant=yes : amenity=restaurant hotel=yes : tourism=hotel ford=yes : highway=ford ruins=yes : historic=ruins +drinkable=yes : amenity=drinking_water building=entrance : entrance=yes natural=marsh : natural=wetland, wetland=marsh diff --git a/generator/generator_tests/osm_type_test.cpp b/generator/generator_tests/osm_type_test.cpp index 4edbd4292a..f7a2c9e222 100644 --- a/generator/generator_tests/osm_type_test.cpp +++ b/generator/generator_tests/osm_type_test.cpp @@ -245,11 +245,12 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_Synonyms) { char const * arr[][2] = { { "building", "yes" }, - { "shop", "yes" }, { "atm", "yes" }, - { "toilets", "yes" }, + { "shop", "yes" }, { "restaurant", "yes" }, { "hotel", "yes" }, + { "toilets", "yes" }, + { "drinkable", "yes"}, }; OsmElement e; @@ -267,7 +268,8 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_Synonyms) char const * arrT4[] = { "amenity", "restaurant" }; char const * arrT5[] = { "tourism", "hotel" }; char const * arrT6[] = { "amenity", "toilets" }; - TEST_EQUAL(params.m_types.size(), 6, (params)); + char const * arrT7[] = { "amenity", "drinking_water" }; + TEST_EQUAL(params.m_types.size(), 7, (params)); TEST(params.IsTypeExist(GetType(arrT1)), ()); TEST(params.IsTypeExist(GetType(arrT2)), ()); @@ -275,6 +277,7 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_Synonyms) TEST(params.IsTypeExist(GetType(arrT4)), ()); TEST(params.IsTypeExist(GetType(arrT5)), ()); TEST(params.IsTypeExist(GetType(arrT6)), ()); + TEST(params.IsTypeExist(GetType(arrT7)), ()); } // Duplicating test. diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp index 5b149140a4..6f36826850 100644 --- a/indexer/feature_data.cpp +++ b/indexer/feature_data.cpp @@ -123,6 +123,7 @@ private: {"amenity", "bench"}, {"amenity", "shelter"}, {"amenity", "toilets"}, + {"amenity", "drinking_water"}, {"building", "address"}, {"building", "has_parts"}, };