comparison test/testStaticDicts.jl @ 734:1a8ef927e732 feature/static_dict

Add test for equality using ===
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 17 Mar 2021 21:24:57 +0100
parents b2af21a4b376
children b5d9fbcdcef1
comparison
equal deleted inserted replaced
726:103f61d09a8b 734:1a8ef927e732
19 @test_throws ArgumentError StaticDict(1=>3, 1=>3) 19 @test_throws ArgumentError StaticDict(1=>3, 1=>3)
20 #TBD: is ArgumentError correct? 20 #TBD: is ArgumentError correct?
21 end 21 end
22 22
23 @testset "equality" begin 23 @testset "equality" begin
24 @test StaticDict(1=>1) == StaticDict(1=>1) # This is not true for the regular Dict 24 @test StaticDict(1=>1) == StaticDict(1=>1)
25
26 # The following is not true for the regular Dict
27 @test StaticDict(1=>1) === StaticDict(1=>1)
25 end 28 end
26 29
27 @testset "get" begin 30 @testset "get" begin
28 d = StaticDict(1=>2, 3=>4) 31 d = StaticDict(1=>2, 3=>4)
29 32