comparison test/testStaticDicts.jl @ 736:b5d9fbcdcef1 feature/static_dict

Add a constuctor taking a tuple
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 17 Mar 2021 21:45:59 +0100
parents 1a8ef927e732
children ca4f17efb279
comparison
equal deleted inserted replaced
735:3e0b0b44868e 736:b5d9fbcdcef1
9 9
10 d = StaticDict(1=>2, 3=>4) 10 d = StaticDict(1=>2, 3=>4)
11 @test d isa StaticDict{Int,Int} 11 @test d isa StaticDict{Int,Int}
12 @test d[1] == 2 12 @test d[1] == 2
13 @test d[3] == 4 13 @test d[3] == 4
14
15 @test StaticDict((1=>2, 3=>4)) == d
14 16
15 @test StaticDict(1=>3, 2=>4.) isa StaticDict{Int,Real} 17 @test StaticDict(1=>3, 2=>4.) isa StaticDict{Int,Real}
16 @test StaticDict(1. =>3, 2=>4) isa StaticDict{Real,Int} 18 @test StaticDict(1. =>3, 2=>4) isa StaticDict{Real,Int}
17 @test StaticDict(1. =>3, 2=>4.) isa StaticDict{Real,Real} 19 @test StaticDict(1. =>3, 2=>4.) isa StaticDict{Real,Real}
18 20