Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mathematica_test a little less brittle #2829

Merged
merged 7 commits into from
Dec 31, 2020

Conversation

eggrobin
Copy link
Member

No description provided.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
…ldens
@eggrobin eggrobin mentioned this pull request Dec 29, 2020
mathematica/mathematica_body.hpp Outdated Show resolved Hide resolved
"SetPrecision[+2.00000000000000000*^+00,$MachinePrecision],"
"SetPrecision[+3.00000000000000000*^+00,$MachinePrecision]]",
ToMathematica(std::vector<double>{2, 3}));
EXPECT_EQ("List[" + ToMathematica(2.0) + "," + ToMathematica(3.0) + "]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to preserve a formatting closer to the original one: (1) line break after [ (2) line break after , (3) line break after the (replacement for) the SetPrecision call, i.e., after the + (unless followed by a comma). The clang-format formatting makes it hard to visually parse the structure.

mathematica/mathematica_test.cpp Outdated Show resolved Hide resolved
mathematica/mathematica_test.cpp Show resolved Hide resolved
numerics/polynomial.hpp Show resolved Hide resolved
@@ -31,12 +31,12 @@ FORWARD_DECLARE_FUNCTION_FROM(
mathematica,
TEMPLATE(typename Value, typename Argument, int degree_,
template<typename, typename, int> typename Evaluator,
typename OptionalExpressIn = std::nullopt_t) std::string,
typename OptionalExpressIn) std::string,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fishy. Similar declarations exist in poisson_series.hpp and piecewise_poisson_series.hpp, so I presume that they would need changing too. As a matter of fact, it's seems better to have the default live in mathematica than in distant units that happen to have a forward declaration.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar declarations exist in poisson_series.hpp and piecewise_poisson_series.hpp

They don’t (they don’t have defaults).

As a matter of fact, it's seems better to have the default live in mathematica than in distant units that happen to have a forward declaration.

This is what this pull request does.

Sorry, something went wrong.

@pleroy pleroy added the LGTM label Dec 30, 2020
@eggrobin
Copy link
Member Author

retest this please

@eggrobin eggrobin merged commit 9c50835 into mockingbirdnest:master Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants