-
Notifications
You must be signed in to change notification settings - Fork 14
[WIP] @test_reference
: add the return_bool
keyword argument to get the pass/fail status as a Bool
#111
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
Conversation
…pass/fail status as a `Bool`
src/test_reference.jl
Outdated
if haskey(kw, :return_bool) | ||
return_bool = kw[:return_bool]::Bool | ||
else | ||
return_bool = false | ||
end | ||
kw = filter(p -> p[1] != :return_bool, kw) |
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.
Just a suggestion for simpler code
if haskey(kw, :return_bool) | |
return_bool = kw[:return_bool]::Bool | |
else | |
return_bool = false | |
end | |
kw = filter(p -> p[1] != :return_bool, kw) | |
return_bool = get(kw, :return_bool, false)::Bool | |
delete!(kw, :return_bool) |
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.
The return_bool = get(kw, :return_bool, false)::Bool
part is good.
The delete!
throws a MethodError
.
This might be better as a Not a strong opinion |
This is a good change but might need some refactoring work. We've discussed changing the interface to @test match_reference(line, "this is the reference line")
@test_broken match_reference(line, "this is another line") |
Sure, I can refactor the code out into a |
No description provided.