Skip to content

Commit 1115743

Browse files
committed
Fix iszero test
1 parent 627a1c4 commit 1115743

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
@@ -941,7 +941,10 @@ end
941941
if U isa UnitUpperTriangular
942942
@test_throws ArgumentError LinearAlgebra.fillband!(U, 2, 0, 1)
943943
end
944-
@test iszero(U)
944+
# check that the error paths do not mutate the array
945+
if U isa UpperTriangular
946+
@test iszero(U)
947+
end
945948

946949
LinearAlgebra.fillband!(U, 1, 0, 1)
947950
@test all(==(1), diagview(U,0))
@@ -971,7 +974,10 @@ end
971974
if L isa UnitLowerTriangular
972975
@test_throws ArgumentError LinearAlgebra.fillband!(L, 2, -1, 0)
973976
end
974-
@test iszero(L)
977+
# check that the error paths do not mutate the array
978+
if L isa LowerTriangular
979+
@test iszero(L)
980+
end
975981

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

0 commit comments

Comments
 (0)