Skip to content

Commit

Permalink
Merge pull request #13341 from gpeairs/gpeairs/tests
Browse files Browse the repository at this point in the history
Added tests for sparsevec
  • Loading branch information
jakebolewski committed Sep 28, 2015
2 parents 26a4df7 + bc43fe6 commit 882447b
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 882447b

Please sign in to comment.