Skip to content

Commit

Permalink
Added tests for sparsevec
Browse files Browse the repository at this point in the history
(cherry picked from commit bc43fe6)
ref #13341
  • Loading branch information
Greg Peairs authored and tkelman committed Sep 28, 2015
1 parent 035c10d commit 1128b7e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/sparsedir/sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,8 @@ A = sprandbool(5,5,0.2)
# test sparsevec
A = sparse(ones(5,5))
@test all(full(sparsevec(A)) .== ones(25))
@test all(full(sparsevec([1:5;],1)) .== ones(5))
@test_throws ArgumentError sparsevec([1:5;], [1:4;])

#test sparse
@test sparse(A) == A
Expand Down

0 comments on commit 1128b7e

Please sign in to comment.