Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andyferris committed Jan 29, 2024
1 parent eadfde0 commit 7f7c65b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
14 changes: 5 additions & 9 deletions test/ArrayDictionary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,19 @@
@test !isempty(d)
@test isequal(copy(d), d)
@test_throws IndexError insert!(d, 10, 12)
@test d[10] == 11
set!(d, 10, 12)
@test length(d) == setwith!(+, d, 10.0, 2.0)
@test d[10.0] == 11
set!(d, 10.0, 12.0)
@test length(d) == 1
@test d[10] == 14
setwith!(+, d, 2.0, 2.0)
@test length(d) == 2
@test d[2] == 2
@test d[10] == 12
setwith!(+, d, 10.0, 2.0)
@test length(d) == 1
@test d[10] == 14
setwith!(+, d, 2.0, 2.0)
@test length(d) == 2
@test d[2] == 2
d[10] = 13
@test length(d) == 2
delete!(d, 2)
@test length(d) == 1
d[10.0] = 13.0
@test d[10] == 13
io = IOBuffer(); print(io, d); @test String(take!(io)) == "{10 = 13}"
if VERSION < v"1.6-"
Expand Down
3 changes: 2 additions & 1 deletion test/Dictionary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@
setwith!(+, d, 2.0, 2.0)
@test length(d) == 2
@test d[2] == 2
delete!(d, 2)
@test length(d) == 1
d[10.0] = 13.0
@test length(d) == 2
@test d[10] == 13
io = IOBuffer(); print(io, d); @test String(take!(io)) == "{10 = 13}"
if VERSION < v"1.6-"
Expand Down
3 changes: 2 additions & 1 deletion test/UnorderedDictionary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@
setwith!(+, d, 2.0, 2.0)
@test length(d) == 2
@test d[2] == 2
delete!(d, 2)
@test length(d) == 1
d[10.0] = 13.0
@test length(d) == 2
@test d[10] == 13
io = IOBuffer(); print(io, d); @test String(take!(io)) == "{10 = 13}"
if VERSION < v"1.6-"
Expand Down

0 comments on commit 7f7c65b

Please sign in to comment.