File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1204,6 +1204,9 @@ end
12041204 B[LinearAlgebra. BandIndex (- 1 ,1 )] = 2
12051205 @test B[2 ,1 ] == 2
12061206 @test_throws " cannot set entry $((3 ,1 )) off the lower bidiagonal band" B[LinearAlgebra. BandIndex (- 2 ,1 )] = 2
1207+
1208+ @test_throws BoundsError B[LinearAlgebra. BandIndex (size (B,1 ),1 )]
1209+ @test_throws BoundsError B[LinearAlgebra. BandIndex (0 ,size (B,1 )+ 1 )]
12071210end
12081211
12091212end # module TestBidiagonal
Original file line number Diff line number Diff line change @@ -1493,7 +1493,9 @@ end
14931493 D = Diagonal (zeros (2 ))
14941494 D[LinearAlgebra. BandIndex (0 ,2 )] = 1
14951495 @test D[2 ,2 ] == 1
1496- @test_throws " cannot set off-diagonal entry" D[LinearAlgebra. BandIndex (1 ,1 )] = 1
1496+ @test_throws " cannot set off-diagonal entry $((1 ,2 )) " D[LinearAlgebra. BandIndex (1 ,1 )] = 1
1497+ @test_throws BoundsError D[LinearAlgebra. BandIndex (size (D,1 ),1 )]
1498+ @test_throws BoundsError D[LinearAlgebra. BandIndex (0 ,size (D,1 )+ 1 )]
14971499end
14981500
14991501end # module TestDiagonal
Original file line number Diff line number Diff line change @@ -1195,12 +1195,16 @@ end
11951195
11961196 @test_throws " cannot set entry $((1 ,3 )) off the tridiagonal band" T[LinearAlgebra. BandIndex (2 ,1 )] = 1
11971197 @test_throws " cannot set entry $((3 ,1 )) off the tridiagonal band" T[LinearAlgebra. BandIndex (- 2 ,1 )] = 1
1198+ @test_throws BoundsError T[LinearAlgebra. BandIndex (size (T,1 ),1 )]
1199+ @test_throws BoundsError T[LinearAlgebra. BandIndex (0 ,size (T,1 )+ 1 )]
11981200
11991201 S = SymTridiagonal (zeros (4 ), zeros (3 ))
12001202 S[LinearAlgebra. BandIndex (0 ,2 )] = 1
12011203 @test S[2 ,2 ] == 1
12021204
12031205 @test_throws " cannot set off-diagonal entry $((1 ,3 )) " S[LinearAlgebra. BandIndex (2 ,1 )] = 1
1206+ @test_throws BoundsError S[LinearAlgebra. BandIndex (size (S,1 ),1 )]
1207+ @test_throws BoundsError S[LinearAlgebra. BandIndex (0 ,size (S,1 )+ 1 )]
12041208end
12051209
12061210end # module TestTridiagonal
You can’t perform that action at this time.
0 commit comments