diff --git a/test/test_linalg.jl b/test/test_linalg.jl index 8baaca0b..543b6e75 100644 --- a/test/test_linalg.jl +++ b/test/test_linalg.jl @@ -1,4 +1,4 @@ -using BandedMatrices, LazyArrays, LinearAlgebra, Test +using BandedMatrices, LazyArrays, LinearAlgebra, FillArrays, Test import Base.Broadcast: materialize, broadcasted import BandedMatrices: BandedMulAddStyle, BandedColumns import LazyArrays: SymmetricLayout, MemoryLayout, Applied @@ -243,5 +243,12 @@ import LazyArrays: SymmetricLayout, MemoryLayout, Applied A = brand(10,10,1,1) @test x'A ≈ x'Matrix(A) ≈ transpose(x)A end + + @testset "mismatched dimensions (#118)" begin + m = BandedMatrix(Eye(3), (0,0)) + @test_throws DimensionMismatch m * [1,2] + @test_throws DimensionMismatch m * [1, 2, 3, 4] + @test_throws DimensionMismatch m \ [1, 2] + end end diff --git a/test/test_symbanded.jl b/test/test_symbanded.jl index 207ddc31..649ab829 100644 --- a/test/test_symbanded.jl +++ b/test/test_symbanded.jl @@ -145,7 +145,8 @@ end y = F\b @test x ≈ y @test_throws DimensionMismatch F\[b;b] - @test det(F) ≈ det(SAL) + + T ≠ Float16 && (@test det(F) ≈ det(SAL)) end for T in (Int16, Int32, Int64, BigInt) A = BandedMatrix{T}(undef, (4,4), (1,1))