Skip to content

Commit 7811cbf

Browse files
committed
Fix iszero test
1 parent 9fd4768 commit 7811cbf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/triangular.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,10 @@ end
973973
if U isa UnitUpperTriangular
974974
@test_throws ArgumentError LinearAlgebra.fillband!(U, 2, 0, 1)
975975
end
976-
@test iszero(U)
976+
# check that the error paths do not mutate the array
977+
if U isa UpperTriangular
978+
@test iszero(U)
979+
end
977980

978981
LinearAlgebra.fillband!(U, 1, 0, 1)
979982
@test all(==(1), diagview(U,0))
@@ -1003,7 +1006,10 @@ end
10031006
if L isa UnitLowerTriangular
10041007
@test_throws ArgumentError LinearAlgebra.fillband!(L, 2, -1, 0)
10051008
end
1006-
@test iszero(L)
1009+
# check that the error paths do not mutate the array
1010+
if L isa LowerTriangular
1011+
@test iszero(L)
1012+
end
10071013

10081014
LinearAlgebra.fillband!(L, 1, -1, 0)
10091015
@test all(==(1), diagview(L,0))

0 commit comments

Comments
 (0)