Skip to content

Fix broken tests causing failures in test/sparse/higherorderfns #20906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions test/sparse/higherorderfns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -427,18 +427,14 @@ end
S = SymTridiagonal(rand(N), rand(N - 1))
# why some of the tests below are broken:
# Diagonal setindex! allows setting off-diagonal entries to zero. Subtypes of
# AbstractTriangular allow analogs. But Bidiagonal, Tridiagonal, and SymTridiagonal
# do not, which seems like a bug. setindex! behavior like that for Diagonal and
# subtypes of AbstractTriangular is necessary for Bidiagonal, Tridiagonal, and
# SymTridiagonal to be targets of the AbstractArray broadcast! methods, hence
# the test failures below.
# AbstractTriangular allow analogs.
@test broadcast!(sin, copy(D), D) == Diagonal(sin.(D))
@test_broken broadcast!(sin, copy(B), B) == Bidiagonal(sin.(B), true)
@test_broken broadcast!(sin, copy(T), T) == Tridiagonal(sin.(T))
@test broadcast!(sin, copy(B), B) == Bidiagonal(sin.(B), true)
@test broadcast!(sin, copy(T), T) == Tridiagonal(sin.(T))
@test_broken broadcast!(sin, copy(S), S) == SymTridiagonal(sin.(S))
@test broadcast!(*, copy(D), D, A) == Diagonal(broadcast(*, D, A))
@test_broken broadcast!(*, copy(B), B, A) == Bidiagonal(broadcast(*, B, A), true)
@test_broken broadcast!(*, copy(T), T, A) == Tridiagonal(broadcast(*, T, A))
@test broadcast!(*, copy(B), B, A) == Bidiagonal(broadcast(*, B, A), true)
@test broadcast!(*, copy(T), T, A) == Tridiagonal(broadcast(*, T, A))
@test_broken broadcast!(*, copy(S), T, sA) == SymTridiagonal(broadcast(*, T, sA))
end

Expand Down