@@ -89,16 +89,9 @@ struct Pass <: Result
89
89
end
90
90
function Base. show (io:: IO , t:: Pass )
91
91
printstyled (io, " Test Passed" ; bold = true , color= :green )
92
- if ! (t. orig_expr === nothing )
93
- print (io, " \n Expression: " , t. orig_expr)
94
- end
95
92
if t. test_type === :test_throws
96
93
# The correct type of exception was thrown
97
94
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)
102
95
end
103
96
end
104
97
@@ -505,7 +498,7 @@ function do_test(result::ExecutionResult, orig_expr)
505
498
value = result. value
506
499
testres = if isa (value, Bool)
507
500
# a true value Passes
508
- value ? Pass (:test , nothing , nothing , value) :
501
+ value ? Pass (:test , orig_expr, result . data , value) :
509
502
Fail (:test , orig_expr, result. data, value, result. source)
510
503
else
511
504
# If the result is non-Boolean, this counts as an Error
@@ -590,7 +583,7 @@ function do_test_throws(result::ExecutionResult, orig_expr, extype)
590
583
end
591
584
end
592
585
if success
593
- testres = Pass (:test_throws , nothing , nothing , exc)
586
+ testres = Pass (:test_throws , orig_expr, extype , exc)
594
587
else
595
588
testres = Fail (:test_throws_wrong , orig_expr, extype, exc, result. source)
596
589
end
0 commit comments