From 65dc921a8964dc04cdb5b114f883982f0b33fa6b Mon Sep 17 00:00:00 2001 From: Rafael Fourquet Date: Tue, 20 Aug 2019 16:07:05 +0200 Subject: [PATCH] add some tests for issubset on Dict --- test/sets.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/sets.jl b/test/sets.jl index 3f511e87b0a5cb..bed4a47b79bda8 100644 --- a/test/sets.jl +++ b/test/sets.jl @@ -354,6 +354,17 @@ end @test !any(Base.hasfastin, Any[[1, 2, 3], "123", Array, String]) + # tests for Dict + d1 = Dict(1=>nothing, 2=>nothing) + d2 = Dict(1=>nothing, 3=>nothing) + d3 = Dict(1=>nothing, 2=>nothing, 3=>nothing) + @test d3 == merge(d1, d2) + @test !(issubset(d1, d2)) + @test !(issubset(d2, d1)) + @test !(issubset(d3, d1)) + @test !(issubset(d3, d2)) + @test issubset(d1, d3) + @test issubset(d2, d3) end @testset "unique" begin