diff --git a/test/dense.jl b/test/dense.jl index 236587df..ca72c84c 100644 --- a/test/dense.jl +++ b/test/dense.jl @@ -1314,7 +1314,7 @@ end A = Matrix{Float64}(undef, 0, 0) @test cbrt(A) == A A = Matrix{Int}(undef, 0, 0) - @test cbrt(A) isa Matrix{Float64} + @test cbrt(A) isa Matrix{Int} end end diff --git a/test/matmul.jl b/test/matmul.jl index 805edeac..53d42d6c 100644 --- a/test/matmul.jl +++ b/test/matmul.jl @@ -1151,19 +1151,19 @@ end @testset "issue #1147: error messages in matmul" begin for T in (Int, Float64, ComplexF64) for f in (identity, Symmetric) - @test_throws "incompatible dimensions for matrix multiplication" f(zeros(T,0,0)) * zeros(T,1,5) - @test_throws "incompatible dimensions for matrix multiplication" f(zeros(T,0,0)) * zeros(T,1) - @test_throws "incompatible dimensions for matrix multiplication" zeros(T,0) * f(zeros(T,2,2)) - @test_throws "incompatible dimensions for matrix multiplication" mul!(zeros(T,0,0), zeros(T,5), zeros(T,5)) - @test_throws "incompatible dimensions for matrix multiplication" mul!(zeros(T,0,0), f(zeros(T,1,1)), zeros(T,0,0)) - @test_throws "incompatible destination size" mul!(zeros(T,0,2), f(zeros(T,1,1)), zeros(T,1,2)) - @test_throws "incompatible destination size" mul!(zeros(T,1,0), f(zeros(T,1,1)), zeros(T,1,2)) - @test_throws "incompatible destination size" mul!(zeros(T,0,0), f(zeros(T,1,1)), zeros(T,1)) - @test_throws "incompatible destination size" mul!(zeros(T,0), f(zeros(T,1,1)), zeros(T,1)) + @test_throws DimensionMismatch f(zeros(T,0,0)) * zeros(T,1,5) + @test_throws DimensionMismatch f(zeros(T,0,0)) * zeros(T,1) + @test_throws DimensionMismatch zeros(T,0) * f(zeros(T,2,2)) + @test_throws DimensionMismatch mul!(zeros(T,0,0), zeros(T,5), zeros(T,5)) + @test_throws DimensionMismatch mul!(zeros(T,0,0), f(zeros(T,1,1)), zeros(T,0,0)) + @test_throws DimensionMismatch mul!(zeros(T,0,2), f(zeros(T,1,1)), zeros(T,1,2)) + @test_throws DimensionMismatch mul!(zeros(T,1,0), f(zeros(T,1,1)), zeros(T,1,2)) + @test_throws DimensionMismatch mul!(zeros(T,0,0), f(zeros(T,1,1)), zeros(T,1)) + @test_throws DimensionMismatch mul!(zeros(T,0), f(zeros(T,1,1)), zeros(T,1)) end - @test_throws "expected size: (2, 2)" LinearAlgebra.matmul2x2!(zeros(T,2,2), 'N', 'N', zeros(T,2,3), zeros(T,3,2)) - @test_throws "expected size: (2, 2)" LinearAlgebra.matmul2x2!(zeros(T,2,3), 'N', 'N', zeros(T,2,2), zeros(T,2,3)) + @test_throws DimensionMismatch LinearAlgebra.matmul2x2!(zeros(T,2,2), 'N', 'N', zeros(T,2,3), zeros(T,3,2)) + @test_throws DimensionMismatch LinearAlgebra.matmul2x2!(zeros(T,2,3), 'N', 'N', zeros(T,2,2), zeros(T,2,3)) end end diff --git a/test/triangular.jl b/test/triangular.jl index a5fa45d0..cf571063 100644 --- a/test/triangular.jl +++ b/test/triangular.jl @@ -904,12 +904,12 @@ end A = UpperTriangular(ones(T,2,2)) B = ones(T,3,3) C = similar(B) - @test_throws "incompatible dimensions for matrix multiplication" mul!(C, A, B) - @test_throws "incompatible dimensions for matrix multiplication" mul!(C, B, A) + @test_throws DimensionMismatch mul!(C, A, B) + @test_throws DimensionMismatch mul!(C, B, A) B = Array(A) C = similar(B, (4,4)) - @test_throws "incompatible destination size" mul!(C, A, B) - @test_throws "incompatible destination size" mul!(C, B, A) + @test_throws DimensionMismatch mul!(C, A, B) + @test_throws DimensionMismatch mul!(C, B, A) end end