Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for Base.copy! #52682

Closed
wants to merge 7 commits into from
Closed
21 changes: 21 additions & 0 deletions stdlib/Future/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,24 @@

using Test
using Future

@testset "Testing copy! for sets" begin
dst = Set([]) # Create an empty set
src = Set([1, 24, 5, 6, 51, 62])
copy!(dst, src)
@test dst == src
end

@testset "Testing copy! for Dictionaries" begin
dst = Dict("a" => 1, "b" => 2)
src = Dict("c" => 3, "d" => 4)
copy!(dst, src)
@test dst == src
end

@testset "Testing copy! for Arrays" begin
dst = [1, 2, 3]
src = [4, 5, 6]
copy!(dst, src)
@test dst == src
end