Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Apr 6, 2024
1 parent 7285f7b commit 19f5b71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 4 additions & 3 deletions geometry/grassmann_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,10 @@ TEST_F(GrassmannTest, Normalize) {

using F = Frame<struct FrameTag>;

PRINCIPIA_CHECK_WELL_FORMED(v.WriteToMessage(&message),
with_variable<Vector<Length, GrassmannTest::World>> v,
with_variable<serialization::Multivector> message);
PRINCIPIA_CHECK_WELL_FORMED(
v.WriteToMessage(&message),
with_variable<Vector<Length, GrassmannTest::World>> v,
with_variable<serialization::Multivector> message);
// TODO(phl): We should refuse to serialize these at compile time; right now
// only deserialization fails.
PRINCIPIA_CHECK_WELL_FORMED(v.WriteToMessage(&message),
Expand Down
5 changes: 3 additions & 2 deletions numerics/polynomial_in_monomial_basis_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ TEST_F(PolynomialInMonomialBasisTest, Evaluate2P) {
0 * Metre / Second}), 0));
}

PRINCIPIA_CHECK_WELL_FORMED(p.Primitive(),
with_variable<PolynomialInMonomialBasisTest::P2A> p);
PRINCIPIA_CHECK_WELL_FORMED(
p.Primitive(),
with_variable<PolynomialInMonomialBasisTest::P2A> p);
PRINCIPIA_CHECK_ILL_FORMED(p.Primitive(),
with_variable<PolynomialInMonomialBasisTest::P2P> p);

Expand Down
8 changes: 6 additions & 2 deletions testing_utilities/check_well_formedness_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@

PRINCIPIA_CHECK_ILL_FORMED(s + 3, with_variable<std::string> s);
PRINCIPIA_CHECK_ILL_FORMED(s + "3", with_variable<std::pair<double, double>> s);
PRINCIPIA_CHECK_WELL_FORMED(s + t, with_variable<std::string> s, with_variable<std::string> t);
PRINCIPIA_CHECK_ILL_FORMED(s - t, with_variable<std::string> s, with_variable<std::string> t);
PRINCIPIA_CHECK_WELL_FORMED(s + t,
with_variable<std::string> s,
with_variable<std::string> t);
PRINCIPIA_CHECK_ILL_FORMED(s - t,
with_variable<std::string> s,
with_variable<std::string> t);

0 comments on commit 19f5b71

Please sign in to comment.