Skip to content

Commit 7344d19

Browse files
authored
Missing bounds error test (#37836)
1 parent d5a8367 commit 7344d19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/SparseArrays/test/sparse.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,6 +2285,8 @@ end
22852285
A = sparse([1], [1], [Vector{Float64}(undef, 3)], 3, 3)
22862286
A[1,1] = [1.0, 2.0, 3.0]
22872287
@test A[1,1] == [1.0, 2.0, 3.0]
2288+
@test_throws BoundsError setindex!(A, [4.0, 5.0, 6.0], 4, 3)
2289+
@test_throws BoundsError setindex!(A, [4.0, 5.0, 6.0], 3, 4)
22882290
end
22892291

22902292
@testset "isstored" begin

0 commit comments

Comments
 (0)