-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviortestsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlib
Description
julia> using Test
julia> @testset for i in 1:1
@testset begin
break
end
end
1-element Array{Any,1}:
Test.DefaultTestSet("i = 1", Any[Test.DefaultTestSet(#= circular reference @-2 =#)], 0, false)
julia> Test.get_testset_depth() # != 0
1
julia> @testset for i in 1:1 # same testset again
@testset begin
break
end
end
1-element Array{Any,1}:
Test.DefaultTestSet("i = 1", Any[Test.DefaultTestSet(#= circular reference @-2 =#)], 0, false)
julia> Test.get_testset_depth() # != 0
2
I think the code above should be an error. Maybe @testset
should be lowered into an "immediately invoked function expression"?
DilumAluthge
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviortestsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlib