diff --git a/src/keypath.jl b/src/keypath.jl index 2cadc1d..3c95c3c 100644 --- a/src/keypath.jl +++ b/src/keypath.jl @@ -114,10 +114,7 @@ See also [`KeyPath`](@ref), [`haskeypath`](@ref), and [`setkeypath!`](@ref). # Examples ```jldoctest -julia> x = Dict(:a => 3, :b => Dict(:c => 4, "d" => [5, 6, 7])) -Dict{Symbol, Any} with 2 entries: - :a => 3 - :b => Dict{Any, Any}(:c=>4, "d"=>[5, 6, 7]) +julia> x = Dict(:a => 3, :b => Dict(:c => 4, "d" => [5, 6, 7])); julia> getkeypath(x, KeyPath(:b, "d", 2)) 6 @@ -140,10 +137,7 @@ See also [`KeyPath`](@ref), [`getkeypath`](@ref), and [`setkeypath!`](@ref). # Examples ```jldoctest -julia> x = Dict(:a => 3, :b => Dict(:c => 4, "d" => [5, 6, 7])) -Dict{Symbol, Any} with 2 entries: - :a => 3 - :b => Dict{Any, Any}(:c=>4, "d"=>[5, 6, 7]) +julia> x = Dict(:a => 3, :b => Dict(:c => 4, "d" => [5, 6, 7])); julia> haskeypath(x, KeyPath(:a)) true diff --git a/test/base.jl b/test/base.jl index d223aca..be00db8 100644 --- a/test/base.jl +++ b/test/base.jl @@ -226,8 +226,7 @@ end @test !Functors.isleaf(os) os2 = fmap(x -> 2x, os) @test os2 isa OrderedSet - @test os2[1] == 2 - @test os2[2] == 4 + @test collect(os2) == [2, 4] end @testset "Types are leaves" begin