Skip to content

Commit 6b03e26

Browse files
committed
Add small amount of tests
1 parent 86564ed commit 6b03e26

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/tensors.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,18 @@ for V in spacelist
739739
@test t t′
740740
end
741741
end
742+
@timedtestset "Tensor embedding" begin
743+
t1 = rand(V1 V1, V2 V3)
744+
t2 = rand(V1, V2 V3)
745+
746+
# embedding small into large
747+
t3 = @constinferred embed!(zerovector(t1), t2)
748+
@test norm(t3) norm(t2)
749+
750+
# embedding large into small
751+
t4 = @constinferred embed!(zerovector(t2), t1)
752+
@test norm(t4) < norm(t1)
753+
end
742754
end
743755
TensorKit.empty_globalcaches!()
744756
end

0 commit comments

Comments
 (0)