FactCheck.jl
FactCheck.jl copied to clipboard
Erroring in facts block when not wrapped with @fact
Consider a case like this:
foo() = 1 + "0"
facts("Testing") do
foo()
@fact 1 => 1
@fact 2 => 3
@fact 3 => 3
@fact 4 => 4
@fact 5 => 5
end
This will still throw an error since foo()
will throw an error and the remaining lines won't execute. My main use case for FactCheck is that tests keep running even if a single line fails. Would you consider the best way to go about this being to do something like @fact foo() => anything
or would it make sense to change the implementation of FactCheck such that if there is an error in the facts
block, other facts
blocks continue running? Thanks!
Thats an interesting idea, I'll have to think about that one!
I strongly support the suggested behavior.
Base.Test in Julia 0.5, or equivalently BaseTestNext https://github.com/IainNZ/BaseTestNext.jl if you're on 0.4, implements this