Skip to content

Commit 307f583

Browse files
committed
add test
1 parent 588ba81 commit 307f583

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/sparsematrix_ops.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,4 +442,11 @@ end
442442
@test one(A) isa SparseMatrixCSC{Int}
443443
end
444444

445+
@testset "transpose! does not allocate" begin
446+
A = sprandn(100, 100, 0.1),
447+
X = deepcopy(A)
448+
transpose!(X, A)
449+
nonzeros(X) .= 0.0
450+
@test @allocated(transpose!(X, A)) == 0
451+
end
445452
end # module

0 commit comments

Comments
 (0)