Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2015-07-02 21:01:47 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:54:49 +0300
commita58b1927cd408d31f4870082e9ab682767967716 (patch)
treee36070765024b5608eaf804b90bbb36d73ce99da /generator/generator_tests
parent0d1f9582169d356fa7faf69f367f57cb42a053d5 (diff)
[classificator] Added admin level value for “place-city-capital” type (2-11).
Diffstat (limited to 'generator/generator_tests')
-rw-r--r--generator/generator_tests/osm_type_test.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/generator/generator_tests/osm_type_test.cpp b/generator/generator_tests/osm_type_test.cpp
index 4d6df79745..c41586a603 100644
--- a/generator/generator_tests/osm_type_test.cpp
+++ b/generator/generator_tests/osm_type_test.cpp
@@ -306,8 +306,9 @@ UNIT_TEST(OsmType_Capital)
{
{
char const * arr[][2] = {
+ { "admin_level", "6" },
+ { "capital", "yes" },
{ "place", "city" },
- { "capital", "yes" }
};
XMLElement e;
@@ -317,13 +318,14 @@ UNIT_TEST(OsmType_Capital)
ftype::GetNameAndType(&e, params);
TEST_EQUAL(params.m_Types.size(), 1, (params));
- TEST(params.IsTypeExist(GetType({"place", "city", "capital"})), ());
+ TEST(params.IsTypeExist(GetType({"place", "city", "capital", "6"})), ());
}
{
char const * arr[][2] = {
+ { "admin_level", "6" },
+ { "capital", "no" },
{ "place", "city" },
- { "capital", "6" }
};
XMLElement e;
@@ -335,6 +337,25 @@ UNIT_TEST(OsmType_Capital)
TEST_EQUAL(params.m_Types.size(), 1, (params));
TEST(params.IsTypeExist(GetType({"place", "city"})), ());
}
+
+ {
+ char const * arr[][2] = {
+ { "admin_level", "6" },
+ { "boundary", "administrative" },
+ { "capital", "2" },
+ { "place", "city" },
+ };
+
+ XMLElement e;
+ FillXmlElement(arr, ARRAY_SIZE(arr), &e);
+
+ FeatureParams params;
+ ftype::GetNameAndType(&e, params);
+
+ TEST_EQUAL(params.m_Types.size(), 2, (params));
+ TEST(params.IsTypeExist(GetType({"place", "city", "capital", "2"})), ());
+ TEST(params.IsTypeExist(GetType({"boundary", "administrative", "6"})), ());
+ }
}
UNIT_TEST(OsmType_Route)