Skip to content

Commit ca18d62

Browse files
committed
test: fix matmul DimensionMismatch
1 parent cecf025 commit ca18d62

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/matmul.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,19 +1151,19 @@ end
11511151
@testset "issue #1147: error messages in matmul" begin
11521152
for T in (Int, Float64, ComplexF64)
11531153
for f in (identity, Symmetric)
1154-
@test_throws "incompatible dimensions for matrix multiplication" f(zeros(T,0,0)) * zeros(T,1,5)
1155-
@test_throws "incompatible dimensions for matrix multiplication" f(zeros(T,0,0)) * zeros(T,1)
1156-
@test_throws "incompatible dimensions for matrix multiplication" zeros(T,0) * f(zeros(T,2,2))
1157-
@test_throws "incompatible dimensions for matrix multiplication" mul!(zeros(T,0,0), zeros(T,5), zeros(T,5))
1158-
@test_throws "incompatible dimensions for matrix multiplication" mul!(zeros(T,0,0), f(zeros(T,1,1)), zeros(T,0,0))
1159-
@test_throws "incompatible destination size" mul!(zeros(T,0,2), f(zeros(T,1,1)), zeros(T,1,2))
1160-
@test_throws "incompatible destination size" mul!(zeros(T,1,0), f(zeros(T,1,1)), zeros(T,1,2))
1161-
@test_throws "incompatible destination size" mul!(zeros(T,0,0), f(zeros(T,1,1)), zeros(T,1))
1162-
@test_throws "incompatible destination size" mul!(zeros(T,0), f(zeros(T,1,1)), zeros(T,1))
1154+
@test_throws DimensionMismatch f(zeros(T,0,0)) * zeros(T,1,5)
1155+
@test_throws DimensionMismatch f(zeros(T,0,0)) * zeros(T,1)
1156+
@test_throws DimensionMismatch zeros(T,0) * f(zeros(T,2,2))
1157+
@test_throws DimensionMismatch mul!(zeros(T,0,0), zeros(T,5), zeros(T,5))
1158+
@test_throws DimensionMismatch mul!(zeros(T,0,0), f(zeros(T,1,1)), zeros(T,0,0))
1159+
@test_throws DimensionMismatch mul!(zeros(T,0,2), f(zeros(T,1,1)), zeros(T,1,2))
1160+
@test_throws DimensionMismatch mul!(zeros(T,1,0), f(zeros(T,1,1)), zeros(T,1,2))
1161+
@test_throws DimensionMismatch mul!(zeros(T,0,0), f(zeros(T,1,1)), zeros(T,1))
1162+
@test_throws DimensionMismatch mul!(zeros(T,0), f(zeros(T,1,1)), zeros(T,1))
11631163
end
11641164

1165-
@test_throws "expected size: (2, 2)" LinearAlgebra.matmul2x2!(zeros(T,2,2), 'N', 'N', zeros(T,2,3), zeros(T,3,2))
1166-
@test_throws "expected size: (2, 2)" LinearAlgebra.matmul2x2!(zeros(T,2,3), 'N', 'N', zeros(T,2,2), zeros(T,2,3))
1165+
@test_throws DimensionMismatch LinearAlgebra.matmul2x2!(zeros(T,2,2), 'N', 'N', zeros(T,2,3), zeros(T,3,2))
1166+
@test_throws DimensionMismatch LinearAlgebra.matmul2x2!(zeros(T,2,3), 'N', 'N', zeros(T,2,2), zeros(T,2,3))
11671167
end
11681168
end
11691169

0 commit comments

Comments
 (0)