Skip to content

Commit

Permalink
Increase codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Jul 30, 2023
1 parent 899e541 commit 0f90369
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_banded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ Base.similar(::MyMatrix, ::Type{T}, m::Int, n::Int) where T = MyMatrix{T}(undef,
@test LinearAlgebra.copymutable_oftype(B', Float64) isa Adjoint{Float64,<:BandedMatrix{Float64}}
@test LinearAlgebra.copymutable_oftype(transpose(B), Float64) == transpose(B)
@test LinearAlgebra.copymutable_oftype(transpose(B), Float64) isa Transpose{Float64,<:BandedMatrix{Float64}}

@test LinearAlgebra.copymutable_oftype(UpperTriangular(B), Float64) == B
end
end
end
6 changes: 6 additions & 0 deletions test/test_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ LinearAlgebra.fill!(A::PseudoBandedMatrix, v) = fill!(A.data,v)
bandwidths(convert(BandedMatrix{Float64}, A)) ==
bandwidths(convert(BandedMatrix{Float64,Matrix{Float64}},A)) ==
bandwidths(A)

@testset "copymutable_oftype" begin
A = PseudoBandedMatrix(rand(5, 4), 1, 2)
@test ArrayLayouts.copymutable_oftype_layout(MemoryLayout(A), A, BigFloat) == A
@test ArrayLayouts.copymutable_oftype_layout(MemoryLayout(A), A, BigFloat) isa BandedMatrix
end
end

@testset "Bi/Tri/Diagonal" begin
Expand Down
7 changes: 7 additions & 0 deletions test/test_linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,12 @@ import BandedMatrices: BandedColumns, _BandedMatrix
end
end
end

@testset "mul with α = 0" begin
A = randn(5,5)
B = brand(5,5,1,2)
@test muladd!(0.0, A, B, 2.0, copy(A)) == 2A
@test muladd!(0.0, B, A, 2.0, copy(A)) == 2A
end
end

0 comments on commit 0f90369

Please sign in to comment.