Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -19,15 +19,11 @@ UNIT_CLASS_TEST(NoUTurnRestrictionTest, CheckNoUTurn_1)
Segment const start(kTestNumMwmId, 3 /* fId */, 0 /* segId */, true /* forward */);
Segment const finish(kTestNumMwmId, 7 /* fId */, 0 /* segId */, true /* forward */);
std::vector<m2::PointD> const expectedGeom = {
{3.0, 0.0}, {2.0, 0.0}, {1.0, 0.0}, {1.0, 1.0}, {1.0, 2.0}
};
std::vector<m2::PointD> const expectedGeom = {{3.0, 0.0}, {2.0, 0.0}, {1.0, 0.0}, {1.0, 1.0}, {1.0, 2.0}};
TestRouteGeom(start, finish, Algorithm::Result::OK, expectedGeom);
std::vector<RestrictionUTurn> noUTurnRestrictions = {
{3 /* featureId */, false /* viaIsFirstPoint */}
};
std::vector<RestrictionUTurn> noUTurnRestrictions = {{3 /* featureId */, false /* viaIsFirstPoint */}};
SetNoUTurnRestrictions(std::move(noUTurnRestrictions));
TestRouteGeom(start, finish, Algorithm::Result::NoPath, {} /* expectedGeom */);
@@ -40,19 +36,14 @@ UNIT_CLASS_TEST(NoUTurnRestrictionTest, CheckNoUTurn_2)
Segment const start(kTestNumMwmId, 2 /* fId */, 0 /* segId */, true /* forward */);
Segment const finish(kTestNumMwmId, 7 /* fId */, 0 /* segId */, true /* forward */);
std::vector<m2::PointD> const expectedGeom = {
{2.0, 0.0}, {1.0, 0.0}, {1.0, 1.0}, {1.0, 2.0}
};
std::vector<m2::PointD> const expectedGeom = {{2.0, 0.0}, {1.0, 0.0}, {1.0, 1.0}, {1.0, 2.0}};
TestRouteGeom(start, finish, Algorithm::Result::OK, expectedGeom);
std::vector<RestrictionUTurn> noUTurnRestrictions = {
{2 /* featureId */, false /* viaIsFirstPoint */}
};
std::vector<RestrictionUTurn> noUTurnRestrictions = {{2 /* featureId */, false /* viaIsFirstPoint */}};
std::vector<m2::PointD> const expectedGeomAfterRestriction = {
{2.0, 0.0}, {3.0, 0.0}, {2.0, 0.0}, {1.0, 0.0}, {1.0, 1.0}, {1.0, 2.0}
};
std::vector<m2::PointD> const expectedGeomAfterRestriction = {{2.0, 0.0}, {3.0, 0.0}, {2.0, 0.0},
{1.0, 0.0}, {1.0, 1.0}, {1.0, 2.0}};
SetNoUTurnRestrictions(std::move(noUTurnRestrictions));
TestRouteGeom(start, finish, Algorithm::Result::OK, expectedGeomAfterRestriction);
@@ -65,19 +56,14 @@ UNIT_CLASS_TEST(NoUTurnRestrictionTest, CheckNoUTurn_3)
Segment const start(kTestNumMwmId, 2 /* fId */, 0 /* segId */, false /* forward */);
Segment const finish(kTestNumMwmId, 3 /* fId */, 0 /* segId */, true /* forward */);
std::vector<m2::PointD> const expectedGeom = {
{1.0, 0.0}, {2.0, 0.0}, {3.0, 0.0}
};
std::vector<m2::PointD> const expectedGeom = {{1.0, 0.0}, {2.0, 0.0}, {3.0, 0.0}};
TestRouteGeom(start, finish, Algorithm::Result::OK, expectedGeom);
std::vector<RestrictionUTurn> noUTurnRestrictions = {
{2 /* featureId */, true /* viaIsFirstPoint */}
};
std::vector<RestrictionUTurn> noUTurnRestrictions = {{2 /* featureId */, true /* viaIsFirstPoint */}};
std::vector<m2::PointD> const expectedGeomAfterRestriction = {
{1.0, 0.0}, {1.0, -1.0}, {1.0, 0.0}, {2.0, 0.0}, {3.0, 0.0}
};
{1.0, 0.0}, {1.0, -1.0}, {1.0, 0.0}, {2.0, 0.0}, {3.0, 0.0}};
SetNoUTurnRestrictions(std::move(noUTurnRestrictions));
TestRouteGeom(start, finish, Algorithm::Result::OK, expectedGeomAfterRestriction);
@@ -90,15 +76,11 @@ UNIT_CLASS_TEST(NoUTurnRestrictionTest, CheckOnlyUTurn_1)
Segment const start(kTestNumMwmId, 2 /* fId */, 0 /* segId */, true /* forward */);
Segment const finish(kTestNumMwmId, 3 /* fId */, 0 /* segId */, true /* forward */);
std::vector<m2::PointD> const expectedGeom = {
{2.0, 0.0}, {3.0, 0.0}
};
std::vector<m2::PointD> const expectedGeom = {{2.0, 0.0}, {3.0, 0.0}};
TestRouteGeom(start, finish, Algorithm::Result::OK, expectedGeom);
std::vector<RestrictionUTurn> onlyUTurnRestrictions = {
{2 /* featureId */, false /* viaIsFirstPoint */}
};
std::vector<RestrictionUTurn> onlyUTurnRestrictions = {{2 /* featureId */, false /* viaIsFirstPoint */}};
RestrictionVec restrictionsNo;
@@ -116,15 +98,11 @@ UNIT_CLASS_TEST(NoUTurnRestrictionTest, CheckOnlyUTurn_2)
Segment const start(kTestNumMwmId, 0 /* fId */, 0 /* segId */, false /* forward */);
Segment const finish(kTestNumMwmId, 5 /* fId */, 0 /* segId */, true /* forward */);
std::vector<m2::PointD> const expectedGeom = {
{0.0, 1.0}, {1.0, 1.0}, {2.0, 2.0}, {3.0, 2.0}
};
std::vector<m2::PointD> const expectedGeom = {{0.0, 1.0}, {1.0, 1.0}, {2.0, 2.0}, {3.0, 2.0}};
TestRouteGeom(start, finish, Algorithm::Result::OK, expectedGeom);
std::vector<RestrictionUTurn> onlyUTurnRestrictions = {
{1 /* featureId */, false /* viaIsFirstPoint */}
};
std::vector<RestrictionUTurn> onlyUTurnRestrictions = {{1 /* featureId */, false /* viaIsFirstPoint */}};
RestrictionVec restrictionsNo;
@@ -132,9 +110,8 @@ UNIT_CLASS_TEST(NoUTurnRestrictionTest, CheckOnlyUTurn_2)
ConvertRestrictionsOnlyUTurnToNo(indexGraph, onlyUTurnRestrictions, restrictionsNo);
SetRestrictions(std::move(restrictionsNo));
std::vector<m2::PointD> const expectedGeomAfterRestriction = {
{0.0, 1.0}, {-1.0, 1.0}, {-1.0, 2.0}, {0.0, 2.0}, {1.0, 2.0}, {2.0, 2.0}, {3.0, 2.0}
};
std::vector<m2::PointD> const expectedGeomAfterRestriction = {{0.0, 1.0}, {-1.0, 1.0}, {-1.0, 2.0}, {0.0, 2.0},
{1.0, 2.0}, {2.0, 2.0}, {3.0, 2.0}};
TestRouteGeom(start, finish, Algorithm::Result::OK, expectedGeomAfterRestriction);
}