From be954d4dc5fb5ce1fe6e38854dfc885b3ee8e590 Mon Sep 17 00:00:00 2001 From: Daniel Karrasch Date: Thu, 1 Aug 2019 21:37:14 +0200 Subject: [PATCH] fix test for sparse matrix assignment (#32756) (cherry picked from commit 30b36364b03a8afe3c543c0a040f3611db7ae19c) --- stdlib/SparseArrays/test/sparse.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/SparseArrays/test/sparse.jl b/stdlib/SparseArrays/test/sparse.jl index 89fd7a5e66766..7aabe76af6dc0 100644 --- a/stdlib/SparseArrays/test/sparse.jl +++ b/stdlib/SparseArrays/test/sparse.jl @@ -93,7 +93,10 @@ do33 = fill(1.,3) end @testset "Issue #30006" begin - SparseMatrixCSC{Float64,Int32}(spzeros(3,3))[:, 1] == [1, 2, 3] + A = SparseMatrixCSC{Float64,Int32}(spzeros(3,3)) + A[:, 1] = [1, 2, 3] + @test nnz(A) == 3 + @test nonzeros(A) == [1, 2, 3] end @testset "concatenation tests" begin