Skip to content

Commit 27857ba

Browse files
committed
Add failing allocation test
1 parent 8ea8e02 commit 27857ba

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/test_sorted_containers.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2027,6 +2027,12 @@ end
20272027

20282028

20292029

2030+
function testSortedAllocs()
2031+
d = SortedDict{Int,Int}(Base.Order.ForwardOrdering())
2032+
x = @allocated empty!(d)
2033+
my_assert(x == 0)
2034+
true
2035+
end
20302036

20312037
@testset "SortedContainers" begin
20322038
@test testSortedDictBasic()
@@ -2038,6 +2044,7 @@ end
20382044
@test testSortedDictConstructors()
20392045
@test testSortedMultiDictConstructors()
20402046
@test testTokens()
2047+
@test testSortedAllocs()
20412048

20422049

20432050
# test all the errors of sorted containers
@@ -2109,4 +2116,3 @@ end
21092116
end
21102117
end
21112118
end
2112-

0 commit comments

Comments
 (0)