Skip to content

Commit

Permalink
Add Test
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Feb 29, 2024
1 parent 211e55a commit 4b09232
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/dispatch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ end
@test all(MA.isequal_canonical.(2 * LinearAlgebra.Hermitian(A, :L), D))
@test all(MA.isequal_canonical.(2 * LinearAlgebra.Hermitian(A, :U), D))
end

@testset "*(::Complex, ::Hermitian)" begin
A = [1 2; 2 3]
B = LinearAlgebra.Hermitian(DummyBigInt.(A))
C = 2im * A
@test 2im * B == C
@test C isa Matrix{Complex{BigInt}}
end
2 changes: 2 additions & 0 deletions test/dummy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,5 @@ end
function Base.:^(x::DummyBigInt, y::Union{Integer,UniformScaling{<:Integer}})
return DummyBigInt(x.data^y)
end

Base.:*(x::Complex, y::DummyBigInt) = x * y.data

0 comments on commit 4b09232

Please sign in to comment.