Skip to content

Commit

Permalink
More tests for WKD ctors (#32228)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and StefanKarpinski committed Jun 4, 2019
1 parent 74d7739 commit 5479d1d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,8 @@ Dict(1 => rand(2,3), 'c' => "asdf") # just make sure this does not trigger a dep
@test WeakKeyDict(a=>i+1 for (i,a) in enumerate([A,B,C]) ) == wkd
@test WeakKeyDict([(A,2), (B,3), (C,4)]) == wkd
@test WeakKeyDict(Pair(A,2), Pair(B,3), Pair(C,4)) == wkd
@test isa(WeakKeyDict(Pair(A,2), Pair(B,3.0), Pair(C,4)), WeakKeyDict{Array{Int,1},Any})
@test isa(WeakKeyDict(Pair(convert(Vector{Number}, A),2), Pair(B,3), Pair(C,4)), WeakKeyDict{Any,Int})
@test copy(wkd) == wkd

@test length(wkd) == 3
Expand Down

0 comments on commit 5479d1d

Please sign in to comment.