Skip to content

Commit 556bee0

Browse files
committed
Fixes test titles mixed up with assertion messages
1 parent f948981 commit 556bee0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/FactCheck.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ end
8383

8484
# Define printing functions for the result types
8585
function Base.show(io::IO, f::Failure)
86-
println(io, "\n<IT::>", replace_lf(f.meta.msg != nothing ? "$(f.meta.msg)" : format_fact(f.expr)))
87-
print(io, "\n<FAILED::>Test Failed")
86+
println(io, "\n<IT::>", replace_lf(format_fact(f.expr)))
87+
print(io, "\n<FAILED::>", replace_lf(f.meta.msg != nothing ? "$(f.meta.msg)" : "Test Failed"))
8888
if f.fact_type == :fact_throws
8989
# @fact_throws didn't get an error, or the right type of error
9090
if f.rhs != :fact_throws_noerror
@@ -98,9 +98,9 @@ function Base.show(io::IO, f::Failure)
9898
# Fancy helper fact
9999
fcFunc = _factcheck_function(args[2])
100100
if haskey(FACTCHECK_FUN_NAMES, fcFunc)
101-
print(io, replace_lf(string(" Expected: ", sprint(show, f.lhs), " ", FACTCHECK_FUN_NAMES[fcFunc], " ", sprint(show, f.rhs))))
101+
print(io, replace_lf(string("<:LF:> Expected: ", sprint(show, f.lhs), " ", FACTCHECK_FUN_NAMES[fcFunc], " ", sprint(show, f.rhs))))
102102
else
103-
print(io, replace_lf(string(" Expected: ", sprint(show, f.lhs), " --> ", fcFunc, "(", sprint(show, f.rhs), ")")))
103+
print(io, replace_lf(string("<:LF:> Expected: ", sprint(show, f.lhs), " --> ", fcFunc, "(", sprint(show, f.rhs), ")")))
104104
end
105105
else
106106
# Normal equality-test-style fact

0 commit comments

Comments
 (0)