Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Feb 14, 2024
1 parent 22e0bac commit 74da2c7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/dispatch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,15 @@ end
@test MA.operate(LinearAlgebra.dot, z, z) == LinearAlgebra.dot(z, z)
end
end

@testset "*(::Real, ::Union{Hermitian,Symmetric})" begin
A = DummyBigInt[1 2; 2 3]
B = DummyBigInt[2 4; 4 6]
@test MA.isequal_canonical(2 * A, B)
C = LinearAlgebra.Symmetric(B)
@test MA.isequal_canonical(2 * LinearAlgebra.Symmetric(A, :U), C)
@test MA.isequal_canonical(2 * LinearAlgebra.Symmetric(A, :L), C)
D = LinearAlgebra.Hermitian(B)
@test all(MA.isequal_canonical.(2 * LinearAlgebra.Hermitian(A, :L), D))
@test all(MA.isequal_canonical.(2 * LinearAlgebra.Hermitian(A, :U), D))
end

0 comments on commit 74da2c7

Please sign in to comment.