diff options
author | vng <viktor.govako@gmail.com> | 2014-08-29 16:52:46 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:25:44 +0300 |
commit | 6f838013e39a8bf279371b36b7eef0389f76db4b (patch) | |
tree | fca0f8ffe0e3800fe7ceca14b1a3a5c35f9adf4e /generator/generator_tests/osm_type_test.cpp | |
parent | bc2849d17f8c958f3e85b7af1567c615e631a030 (diff) |
[generator] Process “capital = yes” only tags to get “place-city-capital” type.
Diffstat (limited to 'generator/generator_tests/osm_type_test.cpp')
-rw-r--r-- | generator/generator_tests/osm_type_test.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/generator/generator_tests/osm_type_test.cpp b/generator/generator_tests/osm_type_test.cpp index ffb9a406fd..6e6d190726 100644 --- a/generator/generator_tests/osm_type_test.cpp +++ b/generator/generator_tests/osm_type_test.cpp @@ -299,3 +299,40 @@ UNIT_TEST(OsmType_Synonyms) TEST(params.IsTypeExist(GetType(arrT)), ()); } } + +UNIT_TEST(OsmType_Capital) +{ + { + char const * arr[][2] = { + { "place", "city" }, + { "capital", "yes" } + }; + + XMLElement e; + FillXmlElement(arr, ARRAY_SIZE(arr), &e); + + FeatureParams params; + ftype::GetNameAndType(&e, params); + + TEST_EQUAL(params.m_Types.size(), 1, ()); + char const * type[] = { "place", "city", "capital" }; + TEST(params.IsTypeExist(GetType(type)), ()); + } + + { + char const * arr[][2] = { + { "place", "city" }, + { "capital", "6" } + }; + + XMLElement e; + FillXmlElement(arr, ARRAY_SIZE(arr), &e); + + FeatureParams params; + ftype::GetNameAndType(&e, params); + + TEST_EQUAL(params.m_Types.size(), 1, ()); + char const * type[] = { "place", "city" }; + TEST(params.IsTypeExist(GetType(type)), ()); + } +} |