Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jofrevalles committed Jul 4, 2023
1 parent 69935f1 commit c6c1312
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/Numerics_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@
@test parent(C) C_ein
end
end

@testset "multiple tensors" begin
A = Tensor(rand(2, 3, 4), (:i, :j, :k))
B = Tensor(rand(4, 5, 3), (:k, :l, :j))
C = Tensor(rand(5, 6, 2), (:l, :m, :i))
D = Tensor(rand(6, 7, 2), (:m, :n, :i))

contracted = contract(A, B, C, D)
@test issetequal(labels(contracted), (:n, :i))
@test issetequal(size(contracted), (7, 2))
@test contracted contract(contract(contract(A, B), C), D)
end
end

@testset "qr" begin
Expand Down

0 comments on commit c6c1312

Please sign in to comment.