-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
test/meta_testing_tools.jl
Outdated
# 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" |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
c1dc183
to
88cb0ce
Compare
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
==