Skip to content

Commit 4254045

Browse files
kshyattdkarrasch
authored andcommitted
Test colon dropstored methods (#34403)
1 parent ed87ece commit 4254045

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/SparseArrays/test/sparse.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,13 @@ end
12021202
# --> Test dropping a block of the matrix towards the upper left
12031203
SparseArrays.dropstored!(A, 2:5, 2:5)
12041204
@test nnz(A) == 42
1205+
# --> Test dropping all elements
1206+
SparseArrays.dropstored!(A, :)
1207+
@test nnz(A) == 0
1208+
A[1:2:9, :] .= 1
1209+
@test nnz(A) == 50
1210+
SparseArrays.dropstored!(A, :, :)
1211+
@test nnz(A) == 0
12051212
end
12061213

12071214
@testset "issue #7507" begin

0 commit comments

Comments
 (0)