Skip to content

Commit

Permalink
Merge pull request #3 from hobovsky/cw-reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
kazk authored Mar 21, 2023
2 parents f8974d9 + e68da8e commit e9e1f1c
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/FactCheck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,17 @@ function Base.show(io::IO, f::Failure)
end

function Base.show(io::IO, e::Error)
println(io, "\n<IT::>", replace_lf(e.meta.msg != nothing ? "$(e.meta.msg)" : format_fact(e.expr)))
println(io, "\n<ERROR::>", replace_lf(sprint(showerror, e.err)))
println(io, "\n<IT::>", replace_lf(format_fact(e.expr)))
errorMsg = e.meta.msg != nothing ? sprint(print, e.meta.msg) : sprint(showerror, e.err)
println(io, "\n<ERROR::>", replace_lf(errorMsg))
println(io, "\n<LOG::-Stack trace>", replace_lf(sprint(showerror, e.err, e.backtrace)))
println(io, "\n<COMPLETEDIN::>")
end

function Base.show(io::IO, s::Success)
if s.rhs == :fact_throws_error
println(io, "\n<IT::>", replace_lf(s.meta.msg != nothing ? "$(s.meta.msg)" : "Throws Error"))
println(io, "\n<PASSED::>Test Passed")
println(io, "\n<COMPLETEDIN::>")
else
println(io, "\n<IT::>", replace_lf(s.meta.msg != nothing ? "$(s.meta.msg)" : format_fact(s.expr)))
println(io, "\n<PASSED::>Test Passed")
println(io, "\n<COMPLETEDIN::>")
end
println(io, "\n<IT::>", replace_lf(format_fact(s.expr)))
println(io, "\n<PASSED::>Test Passed")
println(io, "\n<COMPLETEDIN::>")
end

function Base.show(io::IO, ::Pending)
Expand Down

0 comments on commit e9e1f1c

Please sign in to comment.