ClangFormat and ClangTidy changes

Change-Id: Ib457dcc55ffb405aeaeac711c20bd9217b32f90e
This commit is contained in:
Sameer Agarwal
2022-12-17 17:29:42 -08:00
parent b158515089
commit 8e5d83f07d
15 changed files with 134 additions and 118 deletions
+13 -10
View File
@@ -76,17 +76,20 @@ namespace ceres {
// EXPECT_THAT_MANIFOLD_INVARIANTS_HOLD(manifold, x, delta, y, kTolerance);
// }
#define EXPECT_THAT_MANIFOLD_INVARIANTS_HOLD(manifold, x, delta, y, tolerance) \
::ceres::Vector zero_tangent = ::ceres::Vector::Zero(manifold.TangentSize()); \
EXPECT_THAT(manifold, ::ceres::XPlusZeroIsXAt(x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::XMinusXIsZeroAt(x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::MinusPlusIsIdentityAt(x, delta, tolerance)); \
EXPECT_THAT(manifold, ::ceres::MinusPlusIsIdentityAt(x, zero_tangent, tolerance)); \
EXPECT_THAT(manifold, ::ceres::PlusMinusIsIdentityAt(x, x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::PlusMinusIsIdentityAt(x, y, tolerance)); \
EXPECT_THAT(manifold, ::ceres::HasCorrectPlusJacobianAt(x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::HasCorrectMinusJacobianAt(x, tolerance)); \
::ceres::Vector zero_tangent = \
::ceres::Vector::Zero(manifold.TangentSize()); \
EXPECT_THAT(manifold, ::ceres::XPlusZeroIsXAt(x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::XMinusXIsZeroAt(x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::MinusPlusIsIdentityAt(x, delta, tolerance)); \
EXPECT_THAT(manifold, \
::ceres::MinusPlusIsIdentityAt(x, zero_tangent, tolerance)); \
EXPECT_THAT(manifold, ::ceres::PlusMinusIsIdentityAt(x, x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::PlusMinusIsIdentityAt(x, y, tolerance)); \
EXPECT_THAT(manifold, ::ceres::HasCorrectPlusJacobianAt(x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::HasCorrectMinusJacobianAt(x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::MinusPlusJacobianIsIdentityAt(x, tolerance)); \
EXPECT_THAT(manifold, ::ceres::HasCorrectRightMultiplyByPlusJacobianAt(x, tolerance));
EXPECT_THAT(manifold, \
::ceres::HasCorrectRightMultiplyByPlusJacobianAt(x, tolerance));
// Checks that the invariant Plus(x, 0) == x holds.
MATCHER_P2(XPlusZeroIsXAt, x, tolerance, "") {