From 25cc72705689da239472e9779cd7045875df02e3 Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Sun, 31 Dec 2023 13:44:10 +0530 Subject: [PATCH 1/7] Added Tests for Base.Copy! --- stdlib/Future/test/runtests.jl | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/stdlib/Future/test/runtests.jl b/stdlib/Future/test/runtests.jl index 6deffe74d891c..2a0df992db818 100644 --- a/stdlib/Future/test/runtests.jl +++ b/stdlib/Future/test/runtests.jl @@ -1,4 +1,26 @@ -# This file is a part of Julia. License is MIT: https://julialang.org/license - 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) + println("destination = ", dst) + @test dst == src # Assert sets are equal +end + +@testset "Testing copy! for Dictionaries" begin + dst = Dict("a" => 1, "b" => 2) + src = Dict("c" => 3, "d" => 4) + copy!(dst, src) + println("destination = ", dst) + @test dst == src +end + +@testset "Testing copy! for Arrays" begin + dst = [1, 2, 3] + src = [4, 5, 6] + copy!(dst, src) + @test dst == src + println("destination = ", dst) +end From aa4b7c08dc4f656e664fa352069347f819bd51c8 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 6 Feb 2024 13:12:43 -0500 Subject: [PATCH 2/7] Update runtests.jl --- stdlib/Future/test/runtests.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stdlib/Future/test/runtests.jl b/stdlib/Future/test/runtests.jl index 2a0df992db818..e2f3e939eb21c 100644 --- a/stdlib/Future/test/runtests.jl +++ b/stdlib/Future/test/runtests.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + using Test using Future @@ -5,15 +7,13 @@ using Future dst = Set([]) # Create an empty set src = Set([1, 24, 5, 6, 51, 62]) copy!(dst, src) - println("destination = ", dst) - @test dst == src # Assert sets are equal + @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) - println("destination = ", dst) @test dst == src end @@ -22,5 +22,4 @@ end src = [4, 5, 6] copy!(dst, src) @test dst == src - println("destination = ", dst) end From 4d04c44c9828ba31e5bfb188c69c635cb05f6f16 Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Sun, 11 Feb 2024 17:49:58 +0530 Subject: [PATCH 3/7] Added Unit Tests for Base.copy for Arrays, Sets and Dictionary --- stdlib/Future/test/runtests.jl | 24 ------------------------ test/copy.jl | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/stdlib/Future/test/runtests.jl b/stdlib/Future/test/runtests.jl index e2f3e939eb21c..ee28d60dc4406 100644 --- a/stdlib/Future/test/runtests.jl +++ b/stdlib/Future/test/runtests.jl @@ -1,25 +1 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license - -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 diff --git a/test/copy.jl b/test/copy.jl index 633beee5f2af3..12c7920fe3cf6 100644 --- a/test/copy.jl +++ b/test/copy.jl @@ -268,3 +268,33 @@ end @test islocked(a.lock) @test !islocked(b.lock) end + +""" +Basic tests for Base.copy! +""" +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 + + + From 13d21bce097494ba99b8ac7729f92ca33dd23616 Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Sun, 11 Feb 2024 18:05:05 +0530 Subject: [PATCH 4/7] Added Unit Tests for Base.copy for Arrays, Sets and Dictionary --- test/copy.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/copy.jl b/test/copy.jl index 12c7920fe3cf6..6f9e4ddd33abe 100644 --- a/test/copy.jl +++ b/test/copy.jl @@ -1,7 +1,6 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license using Random - mainres = ([4, 5, 3], [1, 5, 3]) bitres = ([true, true, false], @@ -270,8 +269,9 @@ end end """ -Basic tests for Base.copy! + Basic tests for Base.copy! """ + using Test using Future From 8f87e33bcea399761abe64724b24c3eae818ed9e Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Sun, 11 Feb 2024 18:06:04 +0530 Subject: [PATCH 5/7] Added Unit Tests for Base.copy for Arrays, Sets and Dictionary --- test/copy.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/copy.jl b/test/copy.jl index 6f9e4ddd33abe..11cfa3836d740 100644 --- a/test/copy.jl +++ b/test/copy.jl @@ -294,7 +294,4 @@ end src = [4, 5, 6] copy!(dst, src) @test dst == src -end - - - +end \ No newline at end of file From 16cbefb0cd5f343a9ba256e6e05bd26eb9d9ba27 Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Sun, 11 Feb 2024 18:11:04 +0530 Subject: [PATCH 6/7] Added Unit Tests for Base.copy for Arrays, Sets and Dictionary --- test/copy.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/copy.jl b/test/copy.jl index 11cfa3836d740..1ede8209fcfdf 100644 --- a/test/copy.jl +++ b/test/copy.jl @@ -294,4 +294,4 @@ end src = [4, 5, 6] copy!(dst, src) @test dst == src -end \ No newline at end of file +end From 45c3e1c2a0f20b783d3cee02c4367ac4800cdc9f Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Sun, 11 Feb 2024 18:23:49 +0530 Subject: [PATCH 7/7] squashed commits