Skip to content

Commit

Permalink
Add test that copy/copymutable preserve type
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Jun 25, 2020
1 parent 0f5bd4a commit d9d3901
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/test_sorted_containers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,13 @@ end
# Test AbstractSet/AbstractDict interface
for m in [SortedSet([1,2]), SortedDict(1=>2, 2=>3), SortedMultiDict(1=>2, 1=>3)]
# copy()
@test isequal(copy(m), m)
@test isequal(Base.copymutable(m), m)
let m1 = copy(m)
@test isequal(m1, m)
@test typeof(m1) === typeof(m)
end
let m1 = Base.copymutable(m)
@test isequal(m1, m)
@test typeof(m1) === typeof(m)
end
end
end

0 comments on commit d9d3901

Please sign in to comment.