Skip to content

Commit e682459

Browse files
committed
fix complex show tests
1 parent 9edfd2f commit e682459

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

test/composition.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ using Test, LinearMaps, LinearAlgebra
2121
F2 = F*F
2222
FC2 = FC*FC
2323
F4 = FC2 * F2
24-
@test occursin("10×10 LinearMaps.CompositeMap{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), F4))
24+
@test occursin("10×10 LinearMaps.CompositeMap{$(eltype(F4))}", sprint((t, s) -> show(t, "text/plain", s), F4))
2525
@test length(F4.maps) == 4
2626
@test @inferred F4 * v == @inferred F * (F * (F * (F * v)))
2727
@test @inferred Matrix(M * transpose(M)) A * transpose(A)

test/functionmap.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using Test, LinearMaps, LinearAlgebra, BenchmarkTools
1717
MyFT = @inferred LinearMap{ComplexF64}(myft, N) / sqrt(N)
1818
U = Matrix(MyFT) # will be a unitary matrix
1919
@test @inferred U'U Matrix{eltype(U)}(I, N, N)
20-
@test occursin("$N×$N LinearMaps.FunctionMap{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), MyFT))
20+
@test occursin("$N×$N LinearMaps.FunctionMap{$(eltype(MyFT))}", sprint((t, s) -> show(t, "text/plain", s), MyFT))
2121

2222
CS = @inferred LinearMap(cumsum, 2)
2323
@test size(CS) == (2, 2)

test/kronecker.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using Test, LinearMaps, LinearAlgebra, SparseArrays
88
LA = LinearMap(A)
99
LB = LinearMap(B)
1010
LK = @inferred kron(LA, LB)
11-
@test occursin("6×6 LinearMaps.KroneckerMap{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), LK))
11+
@test occursin("6×6 LinearMaps.KroneckerMap{$(eltype(LK))}", sprint((t, s) -> show(t, "text/plain", s), LK))
1212
@test @inferred size(LK) == size(K)
1313
@test LinearMaps.MulStyle(LK) === LinearMaps.ThreeArg()
1414
for i in (1, 2)

test/linearcombination.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using Test, LinearMaps, LinearAlgebra, BenchmarkTools
1010
@test run(b, samples=3).allocs == 0
1111
n = 10
1212
L = sum(fill(CS!, n))
13-
@test occursin("10×10 LinearMaps.LinearCombination{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), L))
13+
@test occursin("10×10 LinearMaps.LinearCombination{$(eltype(L))}", sprint((t, s) -> show(t, "text/plain", s), L))
1414
@test mul!(u, L, v) n * cumsum(v)
1515
b = @benchmarkable mul!($u, $L, $v, 2, 2)
1616
@test run(b, samples=5).allocs <= 1

test/transpose.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ using Test, LinearMaps, LinearAlgebra, SparseArrays
88
@test transform(transform(CS)) == CS
99
@test LinearMaps.MulStyle(transform(CS)) === LinearMaps.MulStyle(CS)
1010
end
11-
@test occursin("10×10 LinearMaps.TransposeMap{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), transpose(CS)))
12-
@test occursin("10×10 LinearMaps.AdjointMap{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), adjoint(CS)))
11+
@test occursin("10×10 LinearMaps.TransposeMap{$(eltype(CS))}", sprint((t, s) -> show(t, "text/plain", s), transpose(CS)))
12+
@test occursin("10×10 LinearMaps.AdjointMap{$(eltype(CS))}", sprint((t, s) -> show(t, "text/plain", s), adjoint(CS)))
1313
@test !(transpose(CS) == adjoint(CS))
1414
@test !(adjoint(CS) == transpose(CS))
1515
M = Matrix(CS)

0 commit comments

Comments
 (0)