Skip to content

Commit 47e67e8

Browse files
committed
add test
1 parent f307964 commit 47e67e8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/bugfixes.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,18 @@
2929
a = convert(Array, t)
3030
@test a == zeros(size(a))
3131
end
32+
33+
# https://github.com/Jutho/TensorKit.jl/issues/194
34+
@testset "Issue #194" begin
35+
t1 = rand(ℂ^4 ^4)
36+
t2 = tensoralloc(typeof(t1), space(t1), Val(true),
37+
TensorOperations.ManualAllocator())
38+
t3 = similar(t2, ComplexF64, space(t1))
39+
@test storagetype(t3) == Vector{ComplexF64}
40+
t4 = similar(t2, domain(t1))
41+
@test storagetype(t4) == Vector{Float64}
42+
t5 = similar(t2)
43+
@test storagetype(t5) == Vector{Float64}
44+
tensorfree!(t2)
45+
end
3246
end

0 commit comments

Comments
 (0)