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:
authortatiana-yan <tatiana.kondakova@gmail.com>2019-04-23 14:06:13 +0300
committermpimenov <mpimenov@users.noreply.github.com>2019-04-23 18:16:01 +0300
commite77592b68e345c8cec11324be0c03c1b5a8df6bb (patch)
treeacfcf781e18b015aad3956f0b8e1631a3d28cb40 /generator
parent980d407d507ffb4f0ca4c267e74fde324356d00b (diff)
[search] Add RemoveDauplicatingStreets test.
Diffstat (limited to 'generator')
-rw-r--r--generator/generator_tests_support/test_feature.cpp6
-rw-r--r--generator/generator_tests_support/test_feature.hpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/generator/generator_tests_support/test_feature.cpp b/generator/generator_tests_support/test_feature.cpp
index 1ab2e297d8..14fd20412f 100644
--- a/generator/generator_tests_support/test_feature.cpp
+++ b/generator/generator_tests_support/test_feature.cpp
@@ -206,12 +206,12 @@ string TestVillage::ToDebugString() const
// TestStreet --------------------------------------------------------------------------------------
TestStreet::TestStreet(vector<m2::PointD> const & points, string const & name, string const & lang)
- : TestFeature(name, lang), m_points(points)
+ : TestFeature(name, lang), m_points(points), m_highwayType("living_street")
{
}
TestStreet::TestStreet(vector<m2::PointD> const & points, StringUtf8Multilang const & name)
- : TestFeature(name), m_points(points)
+ : TestFeature(name), m_points(points), m_highwayType("living_street")
{
}
@@ -220,7 +220,7 @@ void TestStreet::Serialize(FeatureBuilder1 & fb) const
TestFeature::Serialize(fb);
auto const & classificator = classif();
- fb.SetType(classificator.GetTypeByPath({"highway", "living_street"}));
+ fb.SetType(classificator.GetTypeByPath({"highway", m_highwayType}));
for (auto const & point : m_points)
fb.AddPoint(point);
diff --git a/generator/generator_tests_support/test_feature.hpp b/generator/generator_tests_support/test_feature.hpp
index e9fbc7b01c..a98a606822 100644
--- a/generator/generator_tests_support/test_feature.hpp
+++ b/generator/generator_tests_support/test_feature.hpp
@@ -122,12 +122,15 @@ public:
TestStreet(std::vector<m2::PointD> const & points, std::string const & name, std::string const & lang);
TestStreet(std::vector<m2::PointD> const & points, StringUtf8Multilang const & name);
+ void SetHighwayType(std::string const & type) { m_highwayType = type; }
+
// TestFeature overrides:
void Serialize(FeatureBuilder1 & fb) const override;
std::string ToDebugString() const override;
private:
std::vector<m2::PointD> m_points;
+ std::string m_highwayType;
};
class TestSquare : public TestFeature