mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -26,14 +26,14 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_ManyTypes)
|
||||
FeatureBuilderParams params;
|
||||
|
||||
base::StringIL arr[] = {
|
||||
{ "building" },
|
||||
{ "place", "country" },
|
||||
{ "place", "state" },
|
||||
/// @todo Can't realize is it deprecated or we forgot to add clear styles for it.
|
||||
//{ "place", "county" },
|
||||
{ "place", "region" },
|
||||
{ "place", "city" },
|
||||
{ "place", "town" },
|
||||
{"building"},
|
||||
{"place", "country"},
|
||||
{"place", "state"},
|
||||
/// @todo Can't realize is it deprecated or we forgot to add clear styles for it.
|
||||
//{ "place", "county" },
|
||||
{"place", "region"},
|
||||
{"place", "city"},
|
||||
{"place", "town"},
|
||||
};
|
||||
AddTypes(params, arr);
|
||||
|
||||
@@ -65,18 +65,15 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_LineTypes)
|
||||
FeatureBuilderParams params;
|
||||
|
||||
base::StringIL arr[] = {
|
||||
{ "railway", "rail" },
|
||||
{ "highway", "motorway" },
|
||||
{ "hwtag", "oneway" },
|
||||
{ "psurface", "paved_good" },
|
||||
{ "junction", "roundabout" },
|
||||
{"railway", "rail"}, {"highway", "motorway"}, {"hwtag", "oneway"},
|
||||
{"psurface", "paved_good"}, {"junction", "roundabout"},
|
||||
};
|
||||
|
||||
AddTypes(params, arr);
|
||||
params.FinishAddingTypes();
|
||||
fb1.SetParams(params);
|
||||
|
||||
fb1.AssignPoints({ {0, 0}, {1, 1} });
|
||||
fb1.AssignPoints({{0, 0}, {1, 1}});
|
||||
fb1.SetLinear();
|
||||
|
||||
TEST(fb1.RemoveInvalidTypes(), ());
|
||||
@@ -146,8 +143,8 @@ UNIT_CLASS_TEST(TestWithClassificator, FVisibility_RemoveUselessTypes)
|
||||
|
||||
{
|
||||
std::vector<uint32_t> types;
|
||||
types.push_back(c.GetTypeByPath({ "building" }));
|
||||
types.push_back(c.GetTypeByPath({ "amenity", "theatre" }));
|
||||
types.push_back(c.GetTypeByPath({"building"}));
|
||||
types.push_back(c.GetTypeByPath({"amenity", "theatre"}));
|
||||
|
||||
TEST(RemoveUselessTypes(types, GeomType::Area), ());
|
||||
TEST_EQUAL(types.size(), 2, ());
|
||||
@@ -155,12 +152,12 @@ UNIT_CLASS_TEST(TestWithClassificator, FVisibility_RemoveUselessTypes)
|
||||
|
||||
{
|
||||
std::vector<uint32_t> types;
|
||||
types.push_back(c.GetTypeByPath({ "highway", "primary" }));
|
||||
types.push_back(c.GetTypeByPath({ "building" }));
|
||||
types.push_back(c.GetTypeByPath({"highway", "primary"}));
|
||||
types.push_back(c.GetTypeByPath({"building"}));
|
||||
|
||||
TEST(RemoveUselessTypes(types, GeomType::Area, true /* emptyName */), ());
|
||||
TEST_EQUAL(types.size(), 1, ());
|
||||
TEST_EQUAL(types[0], c.GetTypeByPath({ "building" }), ());
|
||||
TEST_EQUAL(types[0], c.GetTypeByPath({"building"}), ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,10 +165,7 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_RemoveUselessNames)
|
||||
{
|
||||
FeatureBuilderParams params;
|
||||
|
||||
base::StringIL arr[] = {
|
||||
{ "boundary", "administrative", "2" },
|
||||
{ "barrier", "fence" }
|
||||
};
|
||||
base::StringIL arr[] = {{"boundary", "administrative", "2"}, {"barrier", "fence"}};
|
||||
AddTypes(params, arr);
|
||||
params.FinishAddingTypes();
|
||||
|
||||
@@ -181,7 +175,7 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_RemoveUselessNames)
|
||||
FeatureBuilder fb1;
|
||||
fb1.SetParams(params);
|
||||
|
||||
fb1.AssignPoints({ {0, 0}, {1, 1} });
|
||||
fb1.AssignPoints({{0, 0}, {1, 1}});
|
||||
fb1.SetLinear();
|
||||
|
||||
TEST(!fb1.GetName(0).empty(), ());
|
||||
@@ -218,7 +212,7 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_SerializeLocalityObjectForBuildi
|
||||
FeatureBuilderParams params;
|
||||
|
||||
base::StringIL arr[] = {
|
||||
{ "building" },
|
||||
{"building"},
|
||||
};
|
||||
AddTypes(params, arr);
|
||||
|
||||
@@ -261,7 +255,7 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_HouseName)
|
||||
FeatureBuilder fb;
|
||||
FeatureBuilderParams params;
|
||||
|
||||
base::StringIL arr[] = {{ "building" }};
|
||||
base::StringIL arr[] = {{"building"}};
|
||||
AddTypes(params, arr);
|
||||
params.FinishAddingTypes();
|
||||
|
||||
@@ -286,11 +280,8 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_SerializeAccuratelyForIntermedia
|
||||
FeatureBuilderParams params;
|
||||
|
||||
base::StringIL arr[] = {
|
||||
{ "railway", "rail" },
|
||||
{ "highway", "motorway" },
|
||||
{ "hwtag", "oneway" },
|
||||
{ "psurface", "paved_good" },
|
||||
{ "junction", "circular" },
|
||||
{"railway", "rail"}, {"highway", "motorway"}, {"hwtag", "oneway"},
|
||||
{"psurface", "paved_good"}, {"junction", "circular"},
|
||||
};
|
||||
|
||||
AddTypes(params, arr);
|
||||
@@ -300,7 +291,7 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_SerializeAccuratelyForIntermedia
|
||||
auto const diff = 0.33333333334567;
|
||||
std::vector<m2::PointD> points;
|
||||
for (size_t i = 0; i < 100; ++i)
|
||||
points.push_back({ i + diff, i + 1 + diff });
|
||||
points.push_back({i + diff, i + 1 + diff});
|
||||
|
||||
fb1.AssignPoints(std::move(points));
|
||||
fb1.SetLinear();
|
||||
@@ -386,9 +377,7 @@ UNIT_CLASS_TEST(TestWithClassificator, FBuilder_RemoveInconsistentTypes)
|
||||
FeatureBuilderParams params;
|
||||
|
||||
base::StringIL arr[] = {
|
||||
{"highway", "cycleway"}, {"hwtag", "onedir_bicycle"},
|
||||
{"hwtag", "nobicycle"}, {"hwtag", "yesbicycle"}
|
||||
};
|
||||
{"highway", "cycleway"}, {"hwtag", "onedir_bicycle"}, {"hwtag", "nobicycle"}, {"hwtag", "yesbicycle"}};
|
||||
AddTypes(params, arr);
|
||||
TEST_EQUAL(params.m_types.size(), 4, ());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user