Skip to content

Commit 2c90a12

Browse files
committed
fix complex show tests
1 parent e3c8bab commit 2c90a12

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
@@ -22,7 +22,7 @@ using Test, LinearMaps, LinearAlgebra, SparseArrays
2222
F2 = F*F
2323
FC2 = FC*FC
2424
F4 = FC2 * F2
25-
@test occursin("10×10 LinearMaps.CompositeMap{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), F4))
25+
@test occursin("10×10 LinearMaps.CompositeMap{$(eltype(F4))}", sprint((t, s) -> show(t, "text/plain", s), F4))
2626
@test length(F4.maps) == 4
2727
@test @inferred F4 * v == @inferred F * (F * (F * (F * v)))
2828
@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
@@ -9,7 +9,7 @@ using Test, LinearMaps, LinearAlgebra, SparseArrays
99
LB = LinearMap(B)
1010
LK = @inferred kron(LA, LB)
1111
@test_throws AssertionError LinearMaps.KroneckerMap{Float64}((LA, LB))
12-
@test occursin("6×6 LinearMaps.KroneckerMap{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), LK))
12+
@test occursin("6×6 LinearMaps.KroneckerMap{$(eltype(LK))}", sprint((t, s) -> show(t, "text/plain", s), LK))
1313
@test @inferred size(LK) == size(K)
1414
@test LinearMaps.MulStyle(LK) === LinearMaps.ThreeArg()
1515
for i in (1, 2)

test/linearcombination.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using Test, LinearMaps, LinearAlgebra, BenchmarkTools
1111
n = 10
1212
L = sum(fill(CS!, n))
1313
@test_throws AssertionError LinearMaps.LinearCombination{Float64}((CS!, CS!))
14-
@test occursin("10×10 LinearMaps.LinearCombination{Complex{Float64}}", sprint((t, s) -> show(t, "text/plain", s), L))
14+
@test occursin("10×10 LinearMaps.LinearCombination{$(eltype(L))}", sprint((t, s) -> show(t, "text/plain", s), L))
1515
@test mul!(u, L, v) n * cumsum(v)
1616
b = @benchmarkable mul!($u, $L, $v, 2, 2)
1717
@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)