mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user