Skip to content

Commit f54b2a4

Browse files
committed
Add information to passing tests (#25483)
Remove printing of detailed Pass information, not used before this change
1 parent 1888e31 commit f54b2a4

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

stdlib/Test/src/Test.jl

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,9 @@ struct Pass <: Result
8989
end
9090
function Base.show(io::IO, t::Pass)
9191
printstyled(io, "Test Passed"; bold = true, color=:green)
92-
if !(t.orig_expr === nothing)
93-
print(io, "\n Expression: ", t.orig_expr)
94-
end
9592
if t.test_type === :test_throws
9693
# The correct type of exception was thrown
9794
print(io, "\n Thrown: ", typeof(t.value))
98-
elseif t.test_type === :test && t.data !== nothing
99-
# The test was an expression, so display the term-by-term
100-
# evaluated version as well
101-
print(io, "\n Evaluated: ", t.data)
10295
end
10396
end
10497

@@ -505,7 +498,7 @@ function do_test(result::ExecutionResult, orig_expr)
505498
value = result.value
506499
testres = if isa(value, Bool)
507500
# a true value Passes
508-
value ? Pass(:test, nothing, nothing, value) :
501+
value ? Pass(:test, orig_expr, result.data, value) :
509502
Fail(:test, orig_expr, result.data, value, result.source)
510503
else
511504
# If the result is non-Boolean, this counts as an Error
@@ -590,7 +583,7 @@ function do_test_throws(result::ExecutionResult, orig_expr, extype)
590583
end
591584
end
592585
if success
593-
testres = Pass(:test_throws, nothing, nothing, exc)
586+
testres = Pass(:test_throws, orig_expr, extype, exc)
594587
else
595588
testres = Fail(:test_throws_wrong, orig_expr, extype, exc, result.source)
596589
end

0 commit comments

Comments
 (0)