Skip to content

Commit 93da47d

Browse files
committed
Move element type test out
1 parent 5db33c5 commit 93da47d

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

test/abstracttensor/blocktensor.jl

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,14 @@ end
8989
jl_bt1′ = @constinferred convert(TT, jl_bt1)
9090
jl_bt1″ = @inferred BlockTensorMap(jl_bt1′, W)
9191
@test jl_bt1 jl_bt1″
92-
# test conversion to TensorMap with a different element type
93-
t1 = rand(ComplexF32, W)
94-
t2 = rand(ComplexF32, W)
95-
t1′ = @constinferred convert(TensorMap, t1)
96-
t2′ = @constinferred convert(TensorMap, t2)
97-
@test norm(t1) norm(t1′)
98-
@test norm(t2) norm(t2′)
99-
@test inner(t1, t2) inner(t1′, t2′)
100-
t1″ = @inferred BlockTensorMap(t1′, W)
101-
t2″ = @inferred BlockTensorMap(t2′, W)
102-
@test t1 t1″
103-
@test t2 t2″
10492
end
93+
# test conversion to TensorMap with a different element type
94+
t1 = rand(ComplexF32, W)
95+
TT = TensorKit.TensorMap{ComplexF64, spacetype(t1), numout(t1), numin(t1), Vector{ComplexF64}}
96+
t1′ = @constinferred convert(TT, t1)
97+
@test norm(t1) norm(t1′)
98+
t1″ = @inferred BlockTensorMap(t1′, W)
99+
@test t1 t1″
105100
end
106101

107102
@testset "Adapt" begin

0 commit comments

Comments
 (0)