Skip to content

Commit 7414871

Browse files
committed
Store parent testset directly instead of WeakRef
1 parent f23e852 commit 7414871

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/Test/src/Test.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -744,20 +744,20 @@ along with a summary of the test results.
744744
"""
745745
mutable struct DefaultTestSet <: AbstractTestSet
746746
description::AbstractString
747-
parent::WeakRef
747+
parent::Union{Nothing,AbstractTestSet}
748748
results::Vector
749749
n_passed::Int
750750
anynonpass::Bool
751751
end
752752
DefaultTestSet(desc, parent=nothing) =
753-
DefaultTestSet(desc, WeakRef(parent), [], 0, false)
753+
DefaultTestSet(desc, parent, [], 0, false)
754754

755755
function printdescription(io, ts::DefaultTestSet)
756756
descs = AbstractString[ts.description]
757-
parent = ts.parent.value
757+
parent = ts.parent
758758
while parent isa DefaultTestSet
759759
push!(descs, parent.description)
760-
parent = parent.parent.value
760+
parent = parent.parent
761761
end
762762
printstyled(io, "Test Set:", bold=true, color=:white)
763763
if length(descs) == 1

0 commit comments

Comments
 (0)