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

stringify orig_expr in meta-metatests #72

Merged
merged 2 commits into from
Mar 29, 2021
Merged

Conversation

oxinabox
Copy link
Member

Julia broke this on current master
JuliaLang/julia#37809 (comment)

I am not particularly in a hurry to see this merged.
I don't love this change, since it is now sensitive to the spacing that julia happens to use for ==

# Always calling `string` on it gives gives consistency regardless of version.
# https://github.com/JuliaLang/julia/pull/37809
@test string(fails[1].orig_expr) == "false == true"
@test string(fails[2].orig_expr) == "true == false"
Copy link
Contributor

Choose a reason for hiding this comment

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

alternatively we could check if orig_expr is a String (or check the Julia version) and Meta.parse it to an Expr?

Copy link
Contributor

Choose a reason for hiding this comment

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

then we'd be testing what we want to test (which is that the expression is the one we expect), rather than testing the string representation

Copy link
Member Author

Choose a reason for hiding this comment

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

indeed, but it is more complex

Copy link
Member Author

Choose a reason for hiding this comment

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

I still lean towards simpler is better

Copy link
Member

@mzgubic mzgubic Mar 29, 2021

Choose a reason for hiding this comment

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

I've initially done what @nickrobinson251 suggested but I prefer this. In particular the current one which stringifies the expression on the RHS

@oxinabox oxinabox merged commit 15ddc59 into master Mar 29, 2021
@oxinabox oxinabox deleted the ox/stringifyresults branch March 29, 2021 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants