Skip to content

Commit bb81436

Browse files
committed
Add tests
1 parent bcf1973 commit bb81436

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

test/test_factorizations.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ elts = (Float64, ComplexF64)
3939

4040
Q, R = qr(A, (2, 1), (4, 3); full = true)
4141
@test A contract(labels_A, Q, (labels_Q..., :q), R, (:q, labels_R...))
42+
43+
Q, R = qr(A, Val(2), Val(2); full = true)
44+
@test A contract((:a, :b, :c, :d), Q, (:a, :b, :q), R, (:q, :c, :d))
4245
end
4346

4447
@testset "Compact QR ($T)" for T in elts

test/test_matrixfunctions.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ using Test: @test, @testset
1414
TensorAlgebra.$f(a, (3, 2), (4, 1)),
1515
TensorAlgebra.$f(a, biperm((3, 2, 4, 1), Val(2))),
1616
)
17-
fa′ = reshape($f(reshape(permutedims(a, (3, 2, 4, 1)), (4, 4))), (2, 2, 2, 2))
17+
local fa′ = reshape($f(reshape(permutedims(a, (3, 2, 4, 1)), (4, 4))), (2, 2, 2, 2))
1818
@test fa fa′
1919
end
20+
fa = TensorAlgebra.$f(a, Val(2), Val(2))
21+
fa′ = reshape($f(reshape(a, (4, 4))), (2, 2, 2, 2))
22+
@test fa fa′
2023
end
2124
end
2225
end

0 commit comments

Comments
 (0)