comparison test/testStaticDicts.jl @ 741:94941a062124 feature/static_dict

Add tests for constructing empty dicts. Change constructors accordingly
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 17 Mar 2021 22:08:59 +0100
parents e7e06bf394fb
children 6377a5fba0a1
comparison
equal deleted inserted replaced
740:e7e06bf394fb 741:94941a062124
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 14
15 @test StaticDict((1=>2, 3=>4)) == d 15 @test StaticDict((1=>2, 3=>4)) == d
16
17 @test StaticDict() isa StaticDict
18 @test StaticDict{Int,String}() isa StaticDict{Int,String,0}
16 19
17 @test StaticDict(1=>3, 2=>4.) isa StaticDict{Int,Real} 20 @test StaticDict(1=>3, 2=>4.) isa StaticDict{Int,Real}
18 @test StaticDict(1. =>3, 2=>4) isa StaticDict{Real,Int} 21 @test StaticDict(1. =>3, 2=>4) isa StaticDict{Real,Int}
19 @test StaticDict(1. =>3, 2=>4.) isa StaticDict{Real,Real} 22 @test StaticDict(1. =>3, 2=>4.) isa StaticDict{Real,Real}
20 23