Skip to content

Commit

Permalink
Test for the return value of fill!(subarray).
Browse files Browse the repository at this point in the history
  • Loading branch information
sunoru committed Sep 4, 2023
1 parent cd848da commit b16f01c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/sparsematrix_constructors_indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,9 @@ end
a = sprand(10, 10, 0.2)
b = copy(a)
sa = view(a, 1:10, 2:3)
fill!(sa, 0.0)
sa_filled = fill!(sa, 0.0)
# `fill!` should return the sub array instead of its parent.
@test sa_filled === sa
b[1:10, 2:3] .= 0.0
@test a == b
A = sparse([1], [1], [Vector{Float64}(undef, 3)], 3, 3)
Expand Down

0 comments on commit b16f01c

Please sign in to comment.