Skip to content

Commit

Permalink
fix stacktrace tests
Browse files Browse the repository at this point in the history
  • Loading branch information
baumgold committed Jul 30, 2023
1 parent 27c5819 commit 1825b61
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/stacktraces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,16 @@ struct F49231{a,b,c,d,e,f,g} end
tdl = Base.type_depth_limit

str = repr(typeof(view([1, 2, 3], 1:2)))
@test tdl(str, 0, maxdepth = 1) == "SubArray{…}"
@test tdl(str, 0, maxdepth = 2) == "SubArray{$Int, 1, Vector{…}, Tuple{…}, true}"
@test tdl(str, 0, maxdepth = 3) == "SubArray{$Int, 1, Vector{$Int}, Tuple{UnitRange{…}}, true}"
@test tdl(str, 0, maxdepth = 4) == "SubArray{$Int, 1, Vector{$Int}, Tuple{UnitRange{$Int}}, true}"
@test tdl(str, 3) == "SubArray{…}"
@test tdl(str, 44) == "SubArray{…}"
@test tdl(str, 45) == "SubArray{$Int, 1, Vector{…}, Tuple{…}, true}"
@test tdl(str, 59) == "SubArray{$Int, 1, Vector{}, Tuple{}, true}"
@test tdl(str, 60) == "SubArray{$Int, 1, Vector{$Int}, Tuple{UnitRange{…}}, true}"
@test tdl(str, 100) == "SubArray{$Int, 1, Vector{$Int}, Tuple{UnitRange{$Int}}, true}"
@test tdl(str, 0, maxdepth = 1) == "SubVector{…}"
@test tdl(str, 0, maxdepth = 2) == "SubVector{$Int, Vector{…}, Tuple{…}, true}"
@test tdl(str, 0, maxdepth = 3) == "SubVector{$Int, Vector{$Int}, Tuple{UnitRange{…}}, true}"
@test tdl(str, 0, maxdepth = 4) == "SubVector{$Int, Vector{$Int}, Tuple{UnitRange{$Int}}, true}"
@test tdl(str, 3) == "SubVector{…}"
@test tdl(str, 44) == "SubVector{$Int, Vector{…}, Tuple{…}, true}"
@test tdl(str, 45) == "SubVector{$Int, Vector{…}, Tuple{…}, true}"
@test tdl(str, 59) == "SubVector{$Int, Vector{$Int}, Tuple{UnitRange{…}}, true}"
@test tdl(str, 60) == "SubVector{$Int, Vector{$Int}, Tuple{UnitRange{…}}, true}"
@test tdl(str, 100) == "SubVector{$Int, Vector{$Int}, Tuple{UnitRange{$Int}}, true}"

str = repr(Vector{V} where V<:AbstractVector{T} where T<:Real)
@test tdl(str, 0, maxdepth = 1) == "Vector{…} where {…}"
Expand Down

0 comments on commit 1825b61

Please sign in to comment.