Mercurial > repos > public > sbplib_julia
comparison test/testStaticDicts.jl @ 742:6377a5fba0a1 feature/static_dict
Add a simple test for iteration
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 17 Mar 2021 22:13:55 +0100 |
parents | 94941a062124 |
children |
comparison
equal
deleted
inserted
replaced
741:94941a062124 | 742:6377a5fba0a1 |
---|---|
48 @test get(d,3,6) == 4 | 48 @test get(d,3,6) == 4 |
49 @test get(d,5,6) == 6 | 49 @test get(d,5,6) == 6 |
50 end | 50 end |
51 | 51 |
52 @testset "iterate" begin | 52 @testset "iterate" begin |
53 # TODO | 53 pairs = [1=>2, 3=>4, 5=>6] |
54 | |
55 d = StaticDict(pairs...) | |
56 @test collect(d) == pairs | |
54 end | 57 end |
55 | 58 |
56 @testset "merge" begin | 59 @testset "merge" begin |
57 @test merge( | 60 @test merge( |
58 StaticDict(1=>3, 2=> 4), | 61 StaticDict(1=>3, 2=> 4), |