File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -242,8 +242,8 @@ function Base.empty!(t::BalancedTree23)
242242 initializeTree! (t. tree)
243243 t. depth = 1
244244 t. rootloc = 1
245- t. freetreeinds = Vector {Int} ( )
246- t. freedatainds = Vector {Int} ( )
245+ empty! ( t. freetreeinds)
246+ empty! ( t. freedatainds)
247247 empty! (t. useddatacells)
248248 push! (t. useddatacells, 1 , 2 )
249249 return nothing
Original file line number Diff line number Diff 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
21112118end
2112-
You can’t perform that action at this time.
0 commit comments