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 @@ -1184,6 +1184,9 @@ end
11841184 B[LinearAlgebra. BandIndex (- 1 ,1 )] = 2
11851185 @test B[2 ,1 ] == 2
11861186 @test_throws " cannot set entry $((3 ,1 )) off the lower bidiagonal band" B[LinearAlgebra. BandIndex (- 2 ,1 )] = 2
1187+
1188+ @test_throws BoundsError B[LinearAlgebra. BandIndex (size (B,1 ),1 )]
1189+ @test_throws BoundsError B[LinearAlgebra. BandIndex (0 ,size (B,1 )+ 1 )]
11871190end
11881191
11891192end # module TestBidiagonal
Original file line number Diff line number Diff line change @@ -1485,7 +1485,9 @@ end
14851485 D = Diagonal (zeros (2 ))
14861486 D[LinearAlgebra. BandIndex (0 ,2 )] = 1
14871487 @test D[2 ,2 ] == 1
1488- @test_throws " cannot set off-diagonal entry" D[LinearAlgebra. BandIndex (1 ,1 )] = 1
1488+ @test_throws " cannot set off-diagonal entry $((1 ,2 )) " D[LinearAlgebra. BandIndex (1 ,1 )] = 1
1489+ @test_throws BoundsError D[LinearAlgebra. BandIndex (size (D,1 ),1 )]
1490+ @test_throws BoundsError D[LinearAlgebra. BandIndex (0 ,size (D,1 )+ 1 )]
14891491end
14901492
14911493end # module TestDiagonal
Original file line number Diff line number Diff line change @@ -1173,12 +1173,16 @@ end
11731173
11741174 @test_throws " cannot set entry $((1 ,3 )) off the tridiagonal band" T[LinearAlgebra. BandIndex (2 ,1 )] = 1
11751175 @test_throws " cannot set entry $((3 ,1 )) off the tridiagonal band" T[LinearAlgebra. BandIndex (- 2 ,1 )] = 1
1176+ @test_throws BoundsError T[LinearAlgebra. BandIndex (size (T,1 ),1 )]
1177+ @test_throws BoundsError T[LinearAlgebra. BandIndex (0 ,size (T,1 )+ 1 )]
11761178
11771179 S = SymTridiagonal (zeros (4 ), zeros (3 ))
11781180 S[LinearAlgebra. BandIndex (0 ,2 )] = 1
11791181 @test S[2 ,2 ] == 1
11801182
11811183 @test_throws " cannot set off-diagonal entry $((1 ,3 )) " S[LinearAlgebra. BandIndex (2 ,1 )] = 1
1184+ @test_throws BoundsError S[LinearAlgebra. BandIndex (size (S,1 ),1 )]
1185+ @test_throws BoundsError S[LinearAlgebra. BandIndex (0 ,size (S,1 )+ 1 )]
11821186end
11831187
11841188end # module TestTridiagonal
You can’t perform that action at this time.
0 commit comments